COURSE · 1 OF 6
Node.js from first principles
Server-side JavaScript from V8 internals up through production patterns. Designed for engineers who already know JavaScript and want the depth that interviews and incidents demand.
- CHAPTERS
- 16
- FULL NOTES
- 7 h
- REVISION
- 62 m
- DIFFICULTY
- BEGINNER → ADVANCED
WHAT YOU’LL LEARN
What you’ll learn
- The Node runtime and its relationship to V8 and libuv.
- Event-loop internals — phases, microtasks, and the order operations really run in.
- Streams, buffers, and backpressure — the things that make or break file and network I/O.
- When to reach for cluster, worker_threads, or child_process — and when none of them is the answer.
- Production observability: structured logging, metrics, and distributed tracing in Node.
- Common interview questions with the right mental models ready to deploy.
CHAPTERS
Chapters
- ○The Origin Story
Ryan Dahl's 2009 talk and why non-blocking I/O was radical.
- ○JavaScript on the Server
Servers, V8, ECMAScript, and how your JavaScript gets to machine code.
- ○First Code — REPL, Files & Globals
Install Node, the REPL, your first file, and the `global` / `globalThis` / top-level `this` puzzle.
- ○Modules, Exports & Require
CommonJS basics — `require`, `module.exports`, the `index.js` barrel, and how ESM differs.
- ○Module Internals — IIFE, Wrapper & require()
The module wrapper function, the 5 injected parameters, and the 5 steps of require() — interview gold.
- ○libuv & Async I/O
V8 is synchronous. Node feels concurrent. This is how libuv and the event loop bridge the gap.
- ○Sync, Async & the magic of setTimeout(0)
Sync methods freeze the event loop, crypto can block for seconds, and setTimeout(0) still waits for the call stack.
- ○How Node.js actually executes your code
Watch a mixed sync + async program move through the call stack, libuv, and the event loop, step by step.
- ○Deep dive into the V8 JS Engine
Tokens → AST → Ignition → TurboFan → machine code — with Mark-and-Sweep GC running throughout.
- ○libuv & The Event Loop
Six phases, two microtask queues, one single thread — the definitive event loop tour.
- ○Streams & Buffers
Why Node moves bytes in streams, and what backpressure really is.
- ○Streams & Backpressure
Readable, Writable, Transform — and why you care about the high-water mark.
- ○Buffers & Binary Data
When strings lie to you and you need bytes.
- ○Cluster, Workers, Child Processes
Three ways to leave single-threaded land, each for different reasons.
- ○Async Hooks & Context
Tracing async operations across the lifetime of a request.
- ○Observability in Production
Structured logs, metrics, traces — Node-specific patterns.