View on GitHub

reading-notes

Express REST API :

  1. Name 3 real world use cases where you’d want to change the request with custom middleware:
    • Auth middleware
    • Logging Middleware
    • Robot Middleware
  2. True or false: The route handler is middleware?
    • true: Middleware can be added to route handlers or other functions
  3. In what ways can a middleware function end the process and send data to the browser?
    • using error handlers
    • using next method ();
  4. At what point in the request lifecycle can you “inject” middleware?

Documentation: