Node.js Fundamentals
Learn how Node.js actually runs your code: how modules load, why async I/O never blocks, and how files, streams, and HTTP servers fit together. Each lesson pairs real Node code to read with a runnable challenge that models the underlying idea in plain JavaScript.
5 lessons · ~1.5 hours
1. Node Essentials
Modules: ESM vs CommonJS
Every file is its own module — it exports what it chooses and requires what it needs.
The event loop & async I/O
Node stays on one thread by never waiting — it queues work and comes back to it.
Files & paths
Read and write with the fs module, and build paths that survive any operating system.
Streams & buffers
Process data piece by piece so a 2 GB file never has to fit in memory at once.
An HTTP server
A server is a function from request to response — routing just picks which function runs.