Week 2 Readings: Express - jacobwendt-401-advanced-javascript/cr-js-401d3 GitHub Wiki

Week 2 Readings: Express

express routing

  • Express 4.0 comes with the new Router
  • Router is like a mini express application
  • provides us with the routing APIs like .use, .get, .param, and route

express middleware

  • Middleware functions are functions that have access to the request object (req), the response object (res)
  • These functions are used to modify req and res objects
  • parsing request bodies, adding response headers, etc.