π© Node.js Study Book
A chapter-by-chapter course through Node.js Learn, from your first script to a tested, production-ready HTTP API. It's written for developers who know JavaScript (the JavaScript Study Book level) and want to understand how Node really works: the event loop, streams, servers and the tools around them.
How to use this book
- Read in order. The 16 chapters follow the Node.js Learn sections (Getting Started, Command Line, Modules, Asynchronous Work, Files, HTTP, Concurrency, Test Runner, Diagnosticsβ¦), grouped into six parts and ordered from basic to intermediate.
- Look for the π§ boxes. Every hard idea β the event loop, backpressure, the thread pool, streams β comes with a real-world analogy, and π/β boxes connect it to what you already know from browser JavaScript and Java.
- Type the examples. Every example was run on Node 26 and its output checked.
$blocks are terminal sessions,>blocks are REPL sessions, file blocks are ES modules. Use the Copy button. - Do the exercises. Each chapter has 10 exercises marked π’ easy, π‘ medium or π΄ hard, with hidden solutions. Playground exercises grow towards the Chapter 16 project.
- Test yourself. The Final Assessment draws 50 random questions from a pool of 1000, and scores you per chapter.
- Practise beyond the book. The π§© Problem Set has 100 language-neutral problems with exact tests β solve them as Node scripts.
π‘ New to the JavaScript language itself? Do the JavaScript Study Book first (at least Chapters 1β12). Coming from browser code or libraries like axios, chalk or Mocha? Appendix B maps them to built-in Node features. Want types? Appendix A runs TypeScript natively. First time here? Start with Using the Playground.
π Setup: install Node 26 (Current) or Node 24 LTS and check it with node --version, then clone the practice project, coder-hop/nodejs-book-playground, with git clone https://github.com/coder-hop/nodejs-book-playground.git playground. Node 24 runs nearly every example; differences are marked with badges like Node 26.
Keep practising
π§© 100 Practice Problems
25 easy, 25 medium, 25 hard and 25 object-oriented problems with exact test cases. Each one is a Node script that reads stdin β perfect after Chapter 2 (input & output). Check with node runner/run-tests.mjs E01 -- node e01.mjs.
π οΈ How to Solve & Test
Reading stdin and printing stdout in JavaScript, the OOP command-loop template, and the test runner.