Node.js from Scratch
From installing Node.js to understanding why a single thread can serve many requests, and the event loop details that surprise people.
6 parts · about 29 minutes of reading
- Part 1What is Node.js? JavaScript on the Server Explained
Learn what Node.js is, how V8 and libuv power it, and why its event-driven model makes it ideal for I/O-heavy server-side applications.
May 3, 2026 · 6 min read - Part 2Setting Up Your First Node.js Application: A Step-by-Step Guide from Install to HTTP Server
Install Node.js, use the REPL, run your first script, and build a working HTTP server from scratch — no frameworks, no dependencies.
May 3, 2026 · 4 min read - Part 3Blocking vs Non-Blocking Code in Node.js: Why It Makes or Breaks Your Server
Learn how blocking code kills Node.js server performance and how non-blocking async I/O fixes it. Real file and DB examples with benchmarks.
May 7, 2026 · 5 min read - Part 4How Node.js Handles Thousands of Requests on a Single Thread: A Deep Dive into the Event Loop
Learn how Node.js uses the event loop and libuv to handle thousands of concurrent requests on a single thread — with real code examples.
May 2, 2026 · 5 min read - Part 5Async Code in Node.js: Callbacks and Promises Explained with Real Examples
Learn why async code exists in Node.js, how callbacks work, why they fail at scale, and how Promises solve it with real, runnable examples.
May 2, 2026 · 4 min read - Part 6Why Does setImmediate Sometimes Run Before setTimeout(fn, 0)?
Why setImmediate sometimes runs before setTimeout(fn, 0) in Node.js and sometimes after: the event loop phases and timer precision behind it.
Mar 18, 2026 · 5 min read