add router as middleware to the express,
below is your updated code
const router = require('express').Router();
router.post('/', (req, res) => {
console.log("Got here");
res.send("ciao");
});
app.use('/', router);
app.listen(port, () => {
console.log("Server running on port: " + port)
});
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…