Node.js

Every letter of MERN sits on Node.js 2,131 . MongoDB 1,815 is reached through a Node driver, Express 24,430 is a Node library, React 7,897 is built and server-rendered by Node tooling, and Next.js 10,514 is a Node application that serves HTML. Learn the runtime and the other four chapters stop being four frameworks and become four arrangements of the same primitives: modules, streams, events, processes and a non-blocking event loop.

Node.js is a JavaScript runtime built on V8 86,723 , the engine inside Chrome 1 , wrapped in C++ and libuv to give JavaScript access to files, sockets, child processes and cryptography. Its distinguishing feature is the I/O model, not the language: your code runs on one thread and hands every slow operation to the operating system, so ten thousand idle connections cost almost no memory.

Much of what older tutorials tell you to install now ships in the binary — TypeScript stripping, a file watcher, a script runner, .env parsing, a test runner, a permission model. This chapter is written against what the runtime provides today. Front-End Web Development covers installing Node, the npm 2,036 command line, bundlers and the JavaScript language, so those topics are referenced, not repeated.

What you will learn

Sections