Node.js

Node.js is a free, open-source, cross-platform runtime that runs JavaScript outside the browser, most often on servers. Ryan Dahl started it in 2009; it executes code with Google’s V8 engine and handles input/output asynchronously through the libuv library.

Key facts

Type JavaScript runtime environment
Created by Ryan Dahl
First code February 2009
Maintained by Node.js contributors under the OpenJS Foundation
JavaScript engine V8 (Google)
Asynchronous I/O libuv
Written in JavaScript, C++
License MIT
Platforms Windows, macOS, Linux and others
Package manager npm (installed together with Node.js)
Active LTS Node.js 26 “Lithium” (as of November 2026)
Website nodejs.org

History

Ryan Dahl made the first commits to the Node.js repository in February 2009 and presented the project at the JSConf EU conference later that year. The goal was to write fast network servers in JavaScript with non-blocking input/output, so that one process could serve many connections without waiting on each of them.

For a while the community developed two parallel projects, Node.js and io.js. Their code was combined into a single codebase in Node.js 4.0.0, released in September 2015 under the Node.js Foundation. In 2019 that foundation merged with the JS Foundation to form the OpenJS Foundation, the project’s home today.

What Node.js is used for

The project describes Node.js as a runtime for creating servers, web apps, command-line tools and scripts. HTTP support is built in and designed for streaming and low latency, which makes Node.js a common base for web frameworks.

  • Web servers and APIs: backends that serve REST or GraphQL APIs, receive webhooks and work with databases.
  • Real-time services: chats, notifications and live dashboards that keep many connections open.
  • Developer tooling: many front-end bundlers, linters and formatters are npm packages that run on Node.js.
  • Full-stack frameworks: Next.js, for example, lists Node.js among its system requirements.
  • Desktop applications: Electron embeds Chromium and Node.js, so desktop programs can be written in JavaScript, HTML and CSS.
  • Scripts and automation: build steps, data processing and CI tasks.

How it works

The V8 engine

Node.js executes JavaScript with V8, Google’s open-source JavaScript and WebAssembly engine, written in C++ and also used in Chrome. V8 compiles and runs the code, allocates memory and collects garbage. On top of it, Node.js adds what a browser does not offer: access to files, network sockets, child processes and the operating system through built-in modules such as node:fs, node:http and node:child_process.

The event loop and libuv

By default, JavaScript in Node.js runs on a single thread. Instead of waiting for a file to be read or a network reply to arrive, Node.js hands the operation to the operating system and moves on. When the operation completes, its callback is queued and the event loop runs it. Think of a waiter who takes orders from many tables instead of standing by the kitchen until each dish is ready.

The event loop is implemented by libuv, a C library developed primarily for Node.js. It uses operating system mechanisms (epoll, kqueue, IOCP) and keeps a thread pool for blocking or CPU-heavy tasks, such as file system calls, some cryptographic functions and compression. Each loop iteration passes through fixed phases: timers (setTimeout, setInterval), pending callbacks, poll for new I/O events, check (setImmediate) and close callbacks. When no callbacks remain, the process exits.

Modules and npm

Node.js supports two module systems: CommonJS (require) and ECMAScript modules (import). External libraries are installed with npm, the standard package manager that comes with Node.js. A project lists its dependencies in package.json, and npm install downloads them into node_modules. The name npm also refers to the public package registry, which has been part of GitHub since 2020. Yarn and pnpm are alternative clients.

Versions and release cycle

Up to and including Node.js 26, a new major version appeared roughly every six months. Odd-numbered versions were supported for six months, while even-numbered ones received long-term support (LTS): 12 months of Active LTS followed by 18 months of maintenance with critical and security fixes.

Starting with Node.js 27, there is one major release per year. Each line spends six months in Alpha (October to March), meant for library authors and CI testing, not production; then six months as Current (April to October); then 30 months of LTS, for a total of 36 months from the first Current release to end of life. Every line will receive LTS, and version numbers will match the calendar year: 27.0.0 is planned for April 2027 and 28.0.0 for 2028.

Status as of November 2026:

Version Codename Status End of life
27 — Alpha, not for production April 30, 2030 (planned)
26 Lithium Active LTS April 30, 2029
24 Krypton Maintenance LTS April 30, 2028
22 Jod Maintenance LTS April 30, 2027

Node.js 20 reached end of life on April 30, 2026, and Node.js 25 on June 1, 2026. The project recommends using only Active LTS or Maintenance LTS releases in production.

Example: an HTTP server

// server.mjs
import { createServer } from 'node:http';

const server = createServer((req, res) => {
  res.writeHead(200, { 'Content-Type': 'text/plain; charset=utf-8' });
  res.end(`Hello from Node.js ${process.version}\n`);
});

server.listen(3000, '127.0.0.1', () => {
  console.log('Server running at http://127.0.0.1:3000/');
});

Run it with node server.mjs and open http://127.0.0.1:3000/ in a browser. The .mjs extension tells Node.js to treat the file as an ECMAScript module. The callback runs for every request, and while one response is being sent, the event loop keeps serving other clients.

Built-in features of recent versions

  • fetch() is global and has not been experimental since Node.js 21.0.0; a global WebSocket client has been stable since 22.4.0.
  • Test runner: the node:test module and node --test command, stable since 20.0.0.
  • Watch mode: node --watch restarts the process when files change; stable since 22.0.0.
  • .env files: the --env-file flag, no longer experimental since 24.10.0 and 22.21.0.
  • Permission model: --permission restricts access to the file system, network, child processes, worker threads and native addons; stable since 23.5.0 and 22.13.0.
  • TypeScript: type stripping has been on by default since 23.6.0 and 22.18.0 and stable since 25.2.0 and 24.12.0. Node.js replaces type annotations with whitespace and does not check types. Only erasable syntax works: enums and namespaces with runtime code need a separate tool, and tsconfig.json is ignored.

Pros and cons

Pros:

  • One language, JavaScript or TypeScript, on the client and the server.
  • Non-blocking I/O handles many simultaneous connections efficiently when the work is mostly waiting on networks, disks and databases.
  • A large ecosystem of npm packages.
  • A predictable LTS schedule with 30 months of support per line.
  • Built-in testing, watch mode, fetch and TypeScript support reduce dependencies.
  • Cross-platform and released under the permissive MIT license.

Cons:

  • Heavy computation on the main thread blocks the event loop, and every client waits. The worker_threads module or separate processes help with CPU-intensive work.
  • Asynchronous code needs careful error handling.
  • Projects often depend on many third-party packages that must be updated and audited.
  • Major versions have to be upgraded regularly, since each LTS line is supported for a limited time.

Alternative JavaScript runtimes include Deno and Bun; Bun positions itself as a drop-in replacement for Node.js.

How to get started

  1. Install the LTS version. Installers for Windows and macOS and binaries for Linux are at nodejs.org/en/download. The npm documentation recommends a version manager such as nvm, which switches between versions and avoids permission errors with global packages; fnm is another option.
  2. Check the installation and create a project:
nvm install 26
node -v
npm -v
mkdir my-app && cd my-app
npm init -y
node server.mjs
  1. Continue with the guides at nodejs.org/learn and the API reference at nodejs.org/api.

Sources

  1. About Node.js — OpenJS Foundation (accessed 28 November 2026)
  2. Node.js Releases — OpenJS Foundation (accessed 28 November 2026)
  3. Node.js Release Working Group: release schedule — Node.js project (GitHub) (accessed 28 November 2026)
  4. Evolving the Node.js Release Schedule — Node.js Releasers (accessed 28 November 2026)
  5. The Node.js Event Loop — OpenJS Foundation (accessed 28 November 2026)
  6. Modules: TypeScript (Node.js v26 documentation) — OpenJS Foundation (accessed 28 November 2026)
  7. First commit to the Node.js repository (Ryan Dahl, February 16, 2009) — GitHub (accessed 28 November 2026)
  8. Node.js Foundation and JS Foundation Merge to Form OpenJS Foundation — The Linux Foundation (accessed 28 November 2026)

Also available in: Русский · Қазақша