How virendarrawat/express works
Express is a Node.js HTTP framework. The principal workflow is that an application accepts an HTTP request, dispatches it through routing and middleware, and uses request helpers and response helpers to produce an HTTP result; handlers may also render views. The graph includes the documented routing, HTTP-helper, content-negotiation, template, and middleware capabilities. Source excerpts are partial, so links between components are included only where the excerpts or README support them.
Main entry points: express.js Express entry · application.js Application · response.js Response helpers · view.js View lookup/render
Components 13
Application setup
- Express entry
lib/express.js - Application
lib/application.js
Request routing
- Router package
- Route handlers
HTTP interface
- Request helpers
lib/request.js - Response helpers
lib/response.js - HTTP utilities
lib/utils.js - Body parsers
lib/express.js - Static files
lib/express.js
Rendering and helpers
- View lookup/render
lib/view.js - Template engine
Other components
- Application developer
- HTTP client
Connections 20
- Application developer → Express entry: creates app
Readme.md - Express entry → Application: mixes in
lib/express.js - Express entry → Request helpers: sets prototype
lib/express.js - Express entry → Response helpers: sets prototype
lib/express.js - Express entry → Router package: constructs
lib/express.js - Express entry → Body parsers: exports parsers
lib/express.js - Express entry → Static files: exports middleware
lib/express.js - HTTP client → Application: sends request
Readme.md - Application → Router package: dispatches request
lib/application.js - Router package → Route handlers: dispatches route
- Route handlers → Request helpers: reads request
- Route handlers → Response helpers: builds response
- Application → Request helpers: sets app context
lib/application.js - Application → Response helpers: sets app context
lib/application.js - Response helpers → HTTP utilities: uses helpers
lib/response.js - Application → HTTP utilities: configures helpers
lib/application.js - Route handlers → View lookup/render: may render
- Application → View lookup/render: looks up view
lib/application.js - View lookup/render → Template engine: invokes engine
lib/view.js - Template engine → Response helpers: returns rendered output