javascript - Nested GET request Nodejs Expressjs -


i have problem code. want create nested request using nodejs , expressjs, use reuqest like:

http://localhost/zigbee/zi?name='hello' http://localhost/zigbee/zs?name='hello' 

it possible create main route /zigbee/e , 2 subroute /zi/ /zs/ ?

i think implementation like:

app.get('/zigbee/',function(req,res){ ...      app.get('/zi',function(req,res){ ...      app.get('/zs',function(req,res){ ...    }}} 

it possible do? all

ew, no. this:

app.get('/zigbee/:routeparam',function(req,res){     var param = req.params.routeparam;     //do stuff }) 

Comments

Popular posts from this blog

unity3d - Rotate an object to face an opposite direction -

angular - Is it possible to get native element for formControl? -

javascript - Why jQuery Select box change event is now working? -