Read OSS

nodejs/node

6 articles

Prerequisites

01

Node.js Internals: A Map of the Codebase

A high-level orientation to the Node.js repository: dual-language architecture, directory structure, vendored dependencies, the GYP build system, and practical navigation guidance.

02

From main() to Your First Line of JavaScript

A detailed trace of Node.js startup: from the C++ main() entry point through V8 initialization, the JavaScript bootstrap chain, the StartExecution dispatch table, and the event loop.

03

The C++↔JavaScript Bridge: BaseObject, Wraps, and Bindings

Deep dive into Node.js's core C++ architecture: the Wrap class hierarchy, the Environment object, the X-macro pattern, binding loaders, and a worked example tracing fs.readFile().

04

How Node.js Loads Code: CJS, ESM, and the Module Pipeline

Exploration of Node.js's module loading architecture: primordials, the BuiltinModule system, CommonJS loader, ESM loader, CJS↔ESM interop, customization hooks, and TypeScript support.

05

I/O in Node.js: Streams, Handles, and the Event Loop

How Node.js performs I/O: libuv integration, the Wrap hierarchy in practice, JavaScript streams, the timer system, microtask mechanics, and async_hooks tracking.

06

Permissions, Errors, and Web Platform APIs in Node.js

Coverage of Node.js's cross-cutting concerns: the Permission Model, stable error codes, Web Platform API integration, the options system, V8 snapshots, SEA, and the built-in test runner.