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
How V8, libuv and the event loop divide work inside one process.
Which release line to run, and how to pin it per project.
How Node resolves modules, and how to publish for import and require.
How to move bytes with streams and backpressure instead of buffering files.
How to build HTTP, HTTPS, HTTP/2 and WebSocket servers on the standard library.
How to reach every CPU core with worker threads, processes and clustering.
How to configure, log, debug, profile and test with built-in tooling.
How to publish packages and keep the supply chain safe.
Sections
- The Node.js Runtime
- Modules in Practice
- The File System and Paths
- Buffers and Streams
- Events and Async Context
- Networking and HTTP
- Processes and Clustering
- Cryptography
- Configuration and Environment
- Errors and Logging
- Debugging and Profiling
- Built-in Test Runner
- TypeScript on Node
- Packages and Monorepos
- Security and the Supply Chain
- Performance in Production
- Test Yourself!