Node.js — Learning Roadmap
Estimated Time to Job-Ready
4-6 weeks of consistent learning (2-3 hours/day), assuming solid JavaScript fluency already — Node-specific material (the module system, fs/http, streams, the event loop's phases) builds directly on JavaScript rather than re-teaching the language itself.
Phase 1: The Runtime & Core Modules (Week 1)
require/module.exports) — Node's default module system, and ES Modules as the opt-in alternativefs, path, process, and os — Node's core built-in moduleshttp.createServer, no frameworknpm init, package.json, installing and using a first dependencyCheckpoint: can you explain, concretely, what a browser cannot do that Node can, and why? (No DOM/window access on the server side; conversely, no file-system or arbitrary network access from browser JS, for security reasons — different APIs for a different environment, same language and same event-loop model underneath.)
Phase 2: Async I/O, Streams, and Real Patterns (Week 2-3)
fs methods, and why sync methods are a real hazard inside a request handler specifically (they block every other request)createReadStream().pipe(res) and understand why it beats loading the whole file into memoryasync/await — and the specific unhandled-rejection bug.env files and environment-based configurationCheckpoint: given a slow file-serving endpoint under load, can you explain the specific difference fs.createReadStream().pipe(res) makes over fs.readFile() in terms of memory and time-to-first-byte, not just "streams are more efficient"?
Phase 3: The Node Event Loop & Concurrency Model (Week 3-4)
process.nextTick and Promise microtasks vs. macrotask phases — the precise ordering rulesworker_threads for CPU-bound work that must stay in-process; cluster for scaling request throughput across CPU coresCheckpoint: can you explain, in your own words, why Node is described as good for I/O-bound work but not CPU-bound work — specifically, what mechanism makes that true, not just that it's a known rule of thumb? If this is unclear, spend more time here — it's a real production issue and a near-guaranteed interview topic specifically because it's Node-distinctive.
Phase 4: Production Readiness & Interview Prep (Week 4-6)
perf_hooks.monitorEventLoopDelay and what rising event-loop lag actually signalspackage-lock.json, and evaluating whether a dependency is safe to addhttp, deliberately without a framework yetCommon Pitfalls Specific to Node.js (Not Generic Study Advice)
async/await as a fix for CPU-bound work — it only helps with I/O waiting; a genuinely CPU-heavy synchronous loop blocks the thread regardless of how it's calledfs.readFileSync inside a request handler out of habit from script-writing — fine in a one-off script, a real hazard in a server handling concurrent requests.catch() or await a Promise inside a fire-and-forget call — the single most common source of a silently swallowed error or an unexpected process crashcluster fixes a blocking-code problem — it multiplies capacity across processes, but each individual process is still just as blockable by the same CPU-heavy codeGetting Your First Node.js-Heavy Role
fs, a raw-http API) — not just "I used Express," which shows framework familiarity but not runtime understanding
