Node.js
Node.js is an open-source, cross-platform JavaScript runtime that runs code outside the browser, mostly for servers, command-line tools, and build scripts.
Ryan Dahl released Node.js in 2009, and the OpenJS Foundation hosts the project today. It pairs Google’s V8 engine, which executes the ECMAScript language, with libuv, a C library that provides its event loop and asynchronous I/O. As a runtime, it adds host APIs that browsers lack, such as node:fs for files and node:http for network servers.
Most Node.js APIs don’t block while they wait for the disk or the network. They hand the work to the operating system, and the event loop runs a callback or settles a promise when it’s done. A single JavaScript thread can serve many connections this way:
Node.js loads both ES modules and CommonJS files, and it ships with npm. Through Node.js 26, each even-numbered major version became a long-term support (LTS) release. Starting with Node.js 27, the project ships one major version a year, and each one becomes an LTS release.
Example
Say a build script needs to read a project’s settings file before it starts. Browsers can’t read local files this way, but Node.js can, through its node:fs/promises module:
settings.json
{ "outDir": "dist", "minify": true }
read-settings.mjs
import { readFile } from "node:fs/promises";
const text = await readFile("settings.json", "utf8");
const settings = JSON.parse(text);
console.log(`Output folder: ${settings.outDir}`);
console.log(`Minify: ${settings.minify}`);
The node command runs the file:
$ node read-settings.mjs
Output folder: dist
Minify: true
The import from node:fs/promises and the top-level await work because Node.js runs .mjs files as ES modules. While readFile() waits on the disk, the event loop stays free for other work, and the process exits once nothing is left to wait for.
Related Resources
Course
The JavaScript Event Loop, Concurrency, and Workers
Build a weather-station dashboard in JavaScript, and learn how the event loop orders timers and promises, how to cancel work with AbortController, and when to move CPU work to a worker.
For additional information on related topics, take a look at the following resources:
Have a question about this? Mentor AI can show you examples, compare related terms, and point you to tutorials.
By Leodanis Pozo Ramos • Updated Nov. 21, 2026