node.js - Express 4 router implying parameter regex? -


I have found a simple issue where I have 2 passages that work differently, one is:

blah \ groups \ group_id

and then

blah \ groups \ count < p> Returns to a specific group first now, returns the amount of groups that have access to that user later. Now the problem is that the first route is also killed when I use the other path URL which is understandable because it does not know that there is a different route for count to regex it For this, say to use group_id if there is no count in it, but then I can not use it with router.param , so there is a way to count first Use Express to tell, if he does not match If not account group_id ? Or if there is no way to keep the parameter name, but attach some regex, then what is the context, but preserves the parameter name?

Routes operate as middleware and are executed in the order they were placed.

before blah \ groups \ count \ before blah \ groups \ Group_id will ensure that a match of counts Comes before : group_id .

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -