Read: Class 08 Express Routing & Connected API - 401-advanced-javascript-muna/amman-javascript-401d1 GitHub Wiki
Express Routing & Connected API
- index.js - Entry Point
- server.js - Hub, Exported Server
- models/categories.js, etc - Data Models
- routes/categories.js, etc - Routers and Handlers
Routes
- 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