roadmap
- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
Prepare for Express interviews on how a request moves through routes, middleware and error handlers. Covers request and response handling, REST APIs, hardening, Passport sessions and testing.
196 of 196 questions in your plan: 0 known, 0 in progress, 0 due, 0 skipped, 196 new. 0 cut, outside your plan.
Express seldom gets a round to itself. It turns up inside a Node.js backend interview, most often as a live exercise: build or repair a small API, add an endpoint, protect it, and return the right status when something fails. JavaScript full-stack loops raise it in the backend half of the conversation, and from middle level up the questions move from what an endpoint returns to what happens to the request on its way there. The favourite material is ordering and control flow. Why does a handler registered before `app.use(express.json())` find no parsed body? What does the client see when a middleware neither responds nor calls `next()`? Why does a second `res.json()` in one handler throw `ERR_HTTP_HEADERS_SENT`, and why is an error handler written with three parameters skipped? What becomes of a rejected promise inside an async handler, an answer that depends on the major version you run? Experienced candidates then get production questions: why `req.ip` reports the load balancer's address until `trust proxy` is set, why a session cookie marked secure never reaches the browser behind TLS termination, and why the default session store has no place in production. Knowing the API is the entry bar. From middle level on, interviewers listen for reasoning from the router's stack: each request is offered to a list of functions in the order they were registered, and a large share of Express bugs come down to a function in the wrong place, a `next` call skipped or made twice, or a response already committed when the code tries to change it.
Express is a thin layer over Node's own server, so the plan starts beneath it. The [HTTP server](/topics/be-nodejs-http-server) in Node's core is what `app.listen` creates, and the request and response objects Express hands you are Node's, with helpers added. The framework-neutral [request lifecycle](/topics/be-web-frameworks-concepts-lifecycle) supplies the vocabulary used from then on, above all route matching and the moment a response is committed. The next stretch is the single request as Express sees it. [Routing](/topics/be-express-routing) and the [request and response helpers](/topics/be-express-req-res) come first, then the body: Express parses nothing until a parser is mounted, so [body parsing](/topics/be-web-frameworks-concepts-binding-body-parsing) and [multipart uploads](/topics/be-web-frameworks-concepts-binding-multipart-uploads) get their own module before the pipeline. The pipeline is the centre of the plan. The general [chain model](/topics/be-web-frameworks-concepts-middleware) explains delegation and short-circuiting; [Express middleware](/topics/be-express-middleware) is that model with `next` made explicit. [Morgan](/topics/be-morgan), a request logger usually mounted near the top of the chain, follows as a worked case of position deciding what a middleware can observe. Errors come only after the chain, because an Express [error handler](/topics/be-express-error-handling) is one more middleware, and [mapping failures to responses](/topics/be-web-frameworks-concepts-errors) means knowing which functions already ran. From there the plan assembles an application. [REST patterns](/topics/be-express-rest-patterns) put routers, validation and status codes together. [Hardening](/topics/be-express-production-hardening) precedes sign-in on purpose: secure session cookies depend on the proxy settings it covers. [Sessions and cookies](/topics/be-web-frameworks-concepts-state-session-object), with [signed cookies](/topics/be-web-frameworks-concepts-state-cookie-helpers), lead into [Passport and the session store](/topics/be-express-auth), which ends by weighing hand-wired Passport against the [libraries that replace it](/topics/be-express-auth-library-landscape) and what leaving each one costs. [Testing the HTTP layer](/topics/be-web-frameworks-concepts-testing) closes the plan, then [route tests with Supertest](/topics/be-express-testing) against the exported app, since a test of a route exercises every module before it.
Coming from Node.js without Express, take the plan top to bottom with study order switched to by topics; the server and pipeline modules are short for you and make the rest quicker. If Express is your daily framework, keep the page at by frequency and spend your time where habit hides the mechanism: the error modules, the proxy settings in hardening, and how Passport writes the user into the session. Days before a live API exercise, narrow level to the band on the job post and raise importance to must know. The plan treats Express as the framework over a runtime it does not explain. The event loop, streams, worker threads and clustering, and NestJS as the structured alternative built on Express, are in the [Node.js roadmap](/roadmaps/nodejs). Databases and the browser side of the stack are outside it too; the [JS Full Stack Developer roadmap](/roadmaps/javascript-full-stack) places Express among them.
Express seldom gets a round to itself. It turns up inside a Node.js backend interview, most often as a live exercise: build or repair a small API, add an endpoint, protect it, and return the right status when something fails. JavaScript full-stack loops raise it in the backend half of the conversation, and from middle level up the questions move from what an endpoint returns to what happens to the request on its way there.
The favourite material is ordering and control flow. Why does a handler registered before app.use(express.json()) find no parsed body? What does the client see when a middleware neither responds nor calls next()? Why does a second res.json() in one handler throw ERR_HTTP_HEADERS_SENT, and why is an error handler written with three parameters skipped? What becomes of a rejected promise inside an async handler, an answer that depends on the major version you run? Experienced candidates then get production questions: why req.ip reports the load balancer's address until trust proxy is set, why a session cookie marked secure never reaches the browser behind TLS termination, and why the default session store has no place in production.
Knowing the API is the entry bar. From middle level on, interviewers listen for reasoning from the router's stack: each request is offered to a list of functions in the order they were registered, and a large share of Express bugs come down to a function in the wrong place, a next call skipped or made twice, or a response already committed when the code tries to change it.
Express is a thin layer over Node's own server, so the plan starts beneath it. The HTTP server in Node's core is what app.listen creates, and the request and response objects Express hands you are Node's, with helpers added. The framework-neutral request lifecycle supplies the vocabulary used from then on, above all route matching and the moment a response is committed.
The next stretch is the single request as Express sees it. Routing and the request and response helpers come first, then the body: Express parses nothing until a parser is mounted, so body parsing and multipart uploads get their own module before the pipeline.
The pipeline is the centre of the plan. The general chain model explains delegation and short-circuiting; Express middleware is that model with next made explicit. Morgan, a request logger usually mounted near the top of the chain, follows as a worked case of position deciding what a middleware can observe. Errors come only after the chain, because an Express error handler is one more middleware, and mapping failures to responses means knowing which functions already ran.
From there the plan assembles an application. REST patterns put routers, validation and status codes together. Hardening precedes sign-in on purpose: secure session cookies depend on the proxy settings it covers. Sessions and cookies, with signed cookies, lead into Passport and the session store, which ends by weighing hand-wired Passport against the libraries that replace it and what leaving each one costs. Testing the HTTP layer closes the plan, then route tests with Supertest against the exported app, since a test of a route exercises every module before it.
Coming from Node.js without Express, take the plan top to bottom with study order switched to by topics; the server and pipeline modules are short for you and make the rest quicker. If Express is your daily framework, keep the page at by frequency and spend your time where habit hides the mechanism: the error modules, the proxy settings in hardening, and how Passport writes the user into the session. Days before a live API exercise, narrow level to the band on the job post and raise importance to must know.
The plan treats Express as the framework over a runtime it does not explain. The event loop, streams, worker threads and clustering, and NestJS as the structured alternative built on Express, are in the Node.js roadmap. Databases and the browser side of the stack are outside it too; the JS Full Stack Developer roadmap places Express among them.