Inflearn Community Q&A
app.get path에서 배열과 아닌 것의 차이.
Written on
·
208
0
app.get(['/topic/:id','/topic'], function(req,res){
var id = req.params.id;
여기에서 저는 id를 찍으면 /topic/nodejs 이렇게 나오네요. /topic/ 이부분이 붙어서 나오네요.
강사님은 nodjs 만 나오는데 저는 왜 이런거죠?
app.get(/topic/:id', function(req,res){
var id = req.params.id;
배열로 안하고 위에 처럼 그냥 /topic/:id 라고 주면 nodejs 만 나오긴합니다.
nodejs
Answer
This question is waiting for answers
Be the first to answer!





