Skip to content

Instantly share code, notes, and snippets.

@lxynox
Last active June 22, 2019 09:00
Show Gist options
  • Save lxynox/755e2567255282e803492709ea88aada to your computer and use it in GitHub Desktop.
Save lxynox/755e2567255282e803492709ea88aada to your computer and use it in GitHub Desktop.
Routers, middlewares etc

Middlewares

api: [app/router].use

Express middleware dataflow

Scope/Hierarchy of middlewares

  • Application-level middleware
  • Router-level middleware
  • Error-handling middleware
  • Built-in middleware
  • Third-party middleware

Router

api: [app/router].[all/method]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment