A blog series
Node.js From Zero: Event Loop, Streams and Servers
Node.js the way a working developer needs it: the event loop, modules, files and streams, building an HTTP server without a framework, Express and Fastify, errors and logging, async patterns, worker threads and production habits. Every example was run.
- Started
- 2026
- Lessons
- 10
- Reading
- ~2 h
Contents
Every lesson has the same steps: what it is, how it works, a real example, common mistakes, then interview questions with answers you can say out loud.
- Lesson 00What Node.js Is and How It Runs Your CodeV8, libuv and the runtime, the single thread and what it means, modules (ESM and CommonJS), npm, and running your first script.12 min
- Lesson 01The Event Loop: Timers, Promises and the Poll PhaseThe loop phases, microtasks versus macrotasks, process.nextTick, setImmediate, and how a blocked loop freezes everything. Traced and run.16 min
- Lesson 02Files, Paths and Buffersfs and fs/promises, paths, buffers and encodings, reading and writing safely, and watching files.13 min
- Lesson 03Streams and BackpressureReadable, writable and transform streams, pipeline, backpressure shown with real memory numbers, and when streams beat reading whole files.16 min
- Lesson 04An HTTP Server From ScratchThe node:http module, routing by hand, reading bodies, headers and status codes, then why a framework helps.14 min
- Lesson 05Express and Fastify: Middleware, Routing and ValidationThe middleware idea, Express 5 and Fastify side by side, error handling middleware, validation with schemas.15 min
- Lesson 06Errors, Logging and Graceful ShutdownOperational versus programmer errors, uncaught exceptions, structured logs, health checks, and shutting down without dropping requests.15 min
- Lesson 07Concurrency: Promises, Worker Threads, Clusters and Child ProcessesPromise.all and limits, CPU work in worker_threads, cluster and why containers often replace it, and a timed comparison.16 min
- Lesson 08Testing, Performance and Production Habitsnode:test, profiling with --cpu-prof, memory leaks, configuration, Docker basics, and a production checklist.15 min
- Lesson 09Node.js Interview Questions With Model AnswersEvent loop, streams, errors, scaling and security questions with model answers.16 min
Glossary
45 terms used in this series. Inside any lesson, hover or tap a dotted term to see its meaning without leaving the page. Browse all terms →