Express.js — Learning Roadmap
Estimated Time to Job-Ready
3-5 weeks of consistent learning (1-2 hours/day), assuming basic Node.js fluency already — Express itself is a relatively small, focused API surface compared to the runtime it sits on, so most of the time investment is in building real muscle memory around middleware and error handling, not learning a large amount of new syntax.
Phase 1: Routing & Requests (Week 1)
req.params vs. req.queryreq/res — reading headers/body, setting status codes, sending JSONCheckpoint: can you explain the difference between a route parameter and a query string, and give a real example of when you'd use each?
Phase 2: Middleware — the Core Concept (Week 2)
(req, res, next), and the strict contract: call next() or send a response, on every code pathexpress.json(), express.static()) and write your own (a logger, a simple auth check)next()) and observe the hang — this is worth doing on purpose, not just reading aboutCheckpoint: can you explain, from memory, exactly what happens if a middleware neither calls next() nor sends a response? (The request hangs indefinitely — Express has no timeout for this by default.)
Phase 3: Error Handling & Real API Structure (Week 3)
err parameter silently breaks ittry/catch + next(err) pattern, or a wrapper utility, for every async route handlerexpress.Router()-based structure (routes/controllers/middleware folders)Checkpoint: given a route handler that's async and doesn't wrap its await in try/catch, what specifically goes wrong if the awaited call rejects? Can you name the fix in one sentence?
Phase 4: Production Readiness & Interview Prep (Week 4-5)
helmet, cors, and rate limiting at a conceptual level — know what each actually protects againstapp.js from server.js and write a handful of tests with supertestnext() contract and the async-error gotcha out loud, not just recognizing them when readingCommon Pitfalls Specific to Express (Not Generic Study Advice)
express.json() — the single most common beginner bug; req.body is silently undefined, no errorGetting Your First Express-Heavy Role
helmet/cors, and a testing approach (supertest or similar)next() contract, the 4-argument error middleware signature, and the async-error-handling gotcha come up constantly precisely because they distinguish real hands-on experience from having only followed a tutorial
