我的代碼有問題。 我想創建使用和的NodeJS一個Expressjs嵌套的GET請求,我使用GET reuqest像:嵌套的GET請求Nodejs Expressjs
http://localhost/zigbee/zi?name='Hello'
http://localhost/zigbee/zs?name='Hello'
它可以創建一個主要途徑/zigbee/
E和2 subroute /zi/ /zs/
?
我覺得像一個實現:
app.get('/zigbee/',function(req,res){ ...
app.get('/zi',function(req,res){ ...
app.get('/zs',function(req,res){ ...
}}}
這是可能的嗎?謝謝所有
https://expressjs.com/en/4x/api.html#router –