。鉴于以下node.js代码回答下面的问题: 如果域为http://example.com,则此端点的URL是什么?
VsDevCmd.bat
答案 0 :(得分:0)
你应该阅读here
中的路由器快递文件router
.get('/getOrders', function (req, res, next) {
// in here when you request http:/example.com/getOrders
})
.get('/getOrders/:id_or_anything_else', function (req, res, next) {
// in here when you request http:/example.com/getOrders/Order_detail
console.log(req.params.id_or_anything_else)
})
;
module.exports = router;