Remember this
Middleware sits between the incoming request and your route handler. It can run code, change req or res, send a response, or pass control forward.
If it does not send a response, it must call next(). Otherwise the browser, Postman, or curl keeps waiting.
Where it runs
Express has application-level middleware and router-level middleware. You use app.use() for the whole app, or router.use() for one group of routes.
In a recruiter-ready repo, middleware is useful for logging, simple checks, auth later, and parsing request bodies. This lesson focuses on flow, not body parsing.