Express, It Does The Heavy Lifting - 401-advanced-javascript-aimurphy/seattle-javascript-401n13 GitHub Wiki

EXPRESS!

The express train runs through server-land. Along the way it makes stops where property cars like .body, .user, and .query are added and removed, filled and emptied, pulled by the request locomotive. CHOO-CHOOOO~

At the most basic level, express servers job is to handle requests like GET and POST via routes '/' or endpoints. It's a routing middleware.

A bit about Middlewares

Middleware functions can perform the following tasks:

Execute any code. Make changes to the request and the response objects. End the request-response cycle. Call the next middleware function in the stack.

In order to do these we kick middleware into action with app.use.

sources:

John Cokos' lecture

Express

Tutorials Point: Express