Express for Node.jss
Express is a minimal web framework for Node.js that sits on top of the http module. Routes map a method and path to a handler, and middleware functions run in order to parse bodies, log requests or reject bad ones. Handlers send responses with status codes and JSON.
Stage: Web APIs · Part of the Node.js roadmap · Last reviewed 19 November 2026
What to learn in Express
- Define GET and POST routes with path parameters and query strings
- Write custom middleware and understand the order it runs in
- Validate request bodies with a schema library and return 400 errors
- Return consistent JSON responses with correct HTTP status codes
- Add a central error-handling middleware with four arguments
Express interview questions
What is middleware in Express?
Middleware is a function with request, response and next arguments that runs between receiving a request and sending the response. It can modify the request, end the response early, or call next to pass control onward. Order of registration matters.
How does Express recognise an error-handling middleware?
It has four parameters: err, req, res and next. Express skips it during normal flow and calls it when a handler passes an error to next or throws. It must be registered after the routes it should protect.
Where Express fits in the Node.js roadmap
Express belongs to the Web APIs stage (intermediate level), which takes about 22 hours. Serve requests.
Other units in this stage
Back to the full Node.js roadmap