-
Notifications
You must be signed in to change notification settings - Fork 11
ExpressJS
Melissa Stock edited this page May 21, 2019
·
1 revision
- Creates an instance of of express
- Used to make our servers more flexible/modular
- Used to do something before a request is processed
- Ex: Parse data, adding response heads, authenticate user/password
- Order of operations matter. Things happen top to bottom
- Use express.Router() multiple times to define groups of routes
- Apply the express.Router() to a section of our site using app.use()
- Use route middleware to process requests
- Use route middleware to validate parameters using .param()
- Use app.route() as a shortcut to the Router to define multiple requests on a route