-
-
Notifications
You must be signed in to change notification settings - Fork 17.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mounting sub apps with a route prefix doesn't support :params #1881
Comments
yeah right now mounting is a different concept, more like mounting is basically meant for "hiding" part of the part from middleware |
|
the one significant difference i'm noticing with |
nah they're more or less the same efficiency-wise, I wouldn't worry about that. Yup there's 3 or 4 maintainers. nothing wrong with rewriting req.url though, that's what mounting does, for logging etc there's req.originalUrl, node doesn't really facilitate creating mock request objects |
k, i'll give that a try. thanks! |
I have a very similar question. I'm looking for the best way to have the same routes under different language folders. E.g. I don't know if it has been discussed before, but how about matching the API returned from var langRouter = app.route('/:lang');
//It's currently not possible to pass `/users` as parameter
langRouter.get('/users', function(req, res, next) {
}); Edit: Looks like #1935 fixes this, but with different api/logic though. I personally think it would be logical that |
localhost/:user -> 200
localhost/actualUserName -> 404
The text was updated successfully, but these errors were encountered: