node.js - express router similar routes -


i need have 2 routes, similar in start different in ends, how can enforce exact pattern respective route called.

edit - problem lies in app.use statement, i've not reached route yet.

a)

app.get("/admin/event/:id/sessions", function(request, response){

b)

app.get("/admin/event/:id", function(request, response){

c)

app.use("/admin/event/:id", function(request, response, next){ 

d)

app.use("/admin/event/:id/sessions", function(request, response, next){ 

c getting called request get /admin/event/1/sessions, expectation d should getting called. please advise.


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -