Skip to content
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

Router "middleware" #76

Closed
zenazn opened this issue Nov 2, 2014 · 2 comments
Closed

Router "middleware" #76

zenazn opened this issue Nov 2, 2014 · 2 comments

Comments

@zenazn
Copy link
Owner

zenazn commented Nov 2, 2014

I plan on exposing the Goji router as a "middleware" layer of a sort: when this special middleware layer is called, it performs routing logic and places the resulting handler (and likely some other associated data about e.g., the handler that was chosen) into the Goji context. Finally, at the end of the middleware stack, if a route has already been chosen, it will be dispatched to (otherwise, Goji will behave exactly as it currently does).

The motivating use case here is to be able to write middleware that have access to bound URL parameters, or to allow a request logger to print information about which route was chosen for any given request.

Based on a discussion with @bradrydzewski in #32.

@zenazn
Copy link
Owner Author

zenazn commented Nov 2, 2014

Also #70

@pkieltyka
Copy link

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants