The anatomy
of Express
Strip away the tutorials and Express is three things: a function you hand to Node's HTTP server, a stack of Layer objects it walks per request, and a pair of augmented req/res prototypes. Click any block in the lifecycle, any card below, or any highlighted term to see exactly how it works.
One request, top to bottom.
A request enters Node's HTTP server and is handed to app — which is literally a function. From there it descends through app.handle() into the router, gets matched against a stack of Layers, dispatched to a Route, and finally answered by a handler calling res.send(). Click any node.
Eleven components, source-level.
Each card maps to a real file or concept in the Express source tree. Click for the deep cut: what it actually does, the code that does it, how it talks to its neighbours, and a glossary of the terms involved. Several cards carry interactive walkthroughs.