Replies: 2 comments 1 reply
-
I would agree with your idea, but why you want to keep the name of the route in the middle instead of last ?
so according to my view, this would be great option.
Syntax
|
Beta Was this translation helpful? Give feedback.
1 reply
-
app.get(['/users', 'Get All Users'], controllerName); |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Express js should have named option for per route.
Like:
app.get('/users', 'Get All User', controllerName)
app.post('/users/update/:id', 'Update Single User', controllerName)
Those information can be access.
Like:
app.getRouteInfo
should return router information with url and given name.Like:
[{route: '/users', name: 'Get All User'}, {route: '/users/update/:id', name: 'Update single user'}]
Beta Was this translation helpful? Give feedback.
All reactions