expressjs/express
Systems
The Express core is six files. Each one carries a tightly-scoped responsibility, and together they make up the entire express runtime. This section walks through each file as its own subsystem.
| File | Page | What lives there |
|---|---|---|
lib/express.js |
Factory | The createApplication() factory, default exports, re-exports |
lib/application.js |
Application | The app prototype: settings, mount, handle, use, listen, render |
lib/request.js |
Request | The req prototype: accepts*, is, ip, host, query, fresh, ... |
lib/response.js |
Response | The res prototype: send, json, sendFile, redirect, cookie, render |
lib/view.js |
View | Filesystem view lookup and engine dispatch |
lib/utils.js |
Utils | ETag, query parser, trust proxy, content-type helpers |
How they connect
graph TD
Factory[lib/express.js] -->|exposes proto| App[lib/application.js]
Factory -->|exposes proto| Req[lib/request.js]
Factory -->|exposes proto| Res[lib/response.js]
App -->|new View(name)| View[lib/view.js]
App -->|compileETag, compileTrust, compileQueryParser| Utils[lib/utils.js]
Res -->|setCharset, normalizeType, normalizeTypes| Utils
App -->|delegates routing| RouterPkg[router npm package]lib/express.js is the only file that is directly required by user code. Everything else is reached through it.
Reading order for new contributors
- Factory — 81 lines, gives you the whole shape.
- Application — the biggest and most important file in core.
- Response — the largest by LOC and where most user-visible behaviour lives.
- Request — short, all helpers, no surprises.
- View — quick read, useful for understanding template engines.
- Utils — read last; you'll already have seen each helper called from the others.
Related pages
- Architecture — high-level view of how systems and external packages interact.
- Features — capabilities that span multiple systems.
Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.