Part 2. Core
In part 1, I set the scene, introducing Node.js, the server-side JavaScript runtime. I also introduced the main character: Express.
You saw that Express has four major features:
- Middleware —In contrast to vanilla Node.js, where your requests flow through only one function, Express has a middleware stack, which is effectively an array of functions.
- Routing —Routing is a lot like middleware, but the functions are called only when you visit a specific URL with a specific HTTP method. You could run a request handler only when the browser visits yourwebsite.com/about, for example.
- Extensions —Express extends the request and response objects with extra methods and properties for developer convenience.
- Views —Views allow you to dynamically ...