-
Notifications
You must be signed in to change notification settings - Fork 29
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
How to get a matched route to fallthrought to the next middleware? #35
Comments
Dear Ronald, As I tried to describe here: https://github.com/imrefazekas/connect-rest#rest-functions You can have multiple service functions to the same path or a wide range of options (please check documentation for details) to orchestrate your business logic as you wish. But as you observed, connect-rest does not follow the path of "middlewares", it serves a different purpose and aim. I'm sure, you find your voice with connect-rest but if not, lots of REST solutions are built to be a "middleware" only. |
I know it currently doesn't work that way, but I'm not sure why you would not want to make it pure middleware? I'm also not sure what you mean by "middleware-only". It is connect middleware right? It says so everywhere in the readme. I actually made a few changes to your code that makes everything work correctly. It might break some other functionality I am not aware of however, I'm not 100% sure. |
Simple aim. To free the business logic from the signature of underlaying layers. Feel free to fork connect-rest if you want to mutate it down to connect-level. |
When I do something like:
The code is not really that important, it's all about the next-call at the end.
I expect the next (connect) middleware to be invoked, but that never happens. I'm guessing connect-rest does something to block this functionality by wrapping connect's next-callback in their own.
How would I get connect-rest to match and then fall through to the next layer of middleware?
The text was updated successfully, but these errors were encountered: