-
-
Notifications
You must be signed in to change notification settings - Fork 488
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
Please actually document the middleware API #735
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The documentation on middleware just says "You can write your own middleware." and has an example that is entirely unexplained. This really needs real documentation. What order are they called in? Does
next
have any parameters? Would definitely be worth spelling out that "the middelware function is called for every matching endpoint before the request handler is run and calling 'await next()' will wait for the response to be sent before being run" (or whatever is actually the case). As it stands, way too much has to be assumed or inferred by this.The text was updated successfully, but these errors were encountered: