TechnologyJavaScript runtime

Node.js

Also known as: Node

Open-source JavaScript runtime built on Google's V8 engine that runs JavaScript outside the browser using an event-driven, non-blocking model.

Node.js is a runtime environment that executes JavaScript outside a web browser, most often on servers and developer machines. It is built on Google's V8 engine and adds APIs for files, networking, processes and other system resources. Node.js uses a single-threaded event loop with non-blocking input and output, handled largely by the libuv library, so one process can serve many simultaneous connections while waiting on disks and networks. It is open source under the MIT License and governed by the OpenJS Foundation.

Ryan Dahl introduced Node.js in 2009, presenting it at JSConf EU that November. The npm package manager, released in 2010, grew into one of the largest software registries in the world and was acquired by GitHub in 2020. A governance dispute led to the io.js fork in 2014, which reunited with Node.js in 2015 under a neutral foundation, later merged into the OpenJS Foundation. Releases follow a predictable schedule, with even-numbered versions becoming long-term support releases.

Node.js let web developers use one language on both client and server and became the foundation of front-end tooling, including bundlers, test runners and build tools such as Vite. Its huge dependency ecosystem is also a risk: in 2016 the removal of the tiny left-pad package briefly broke builds worldwide, and malicious or hijacked packages have enabled supply chain attacks. Dahl later created Deno, and Bun is another alternative runtime, both responding to lessons from Node.js.

Key points

  • Node.js runs JavaScript outside the browser using Google's V8 engine.
  • Its event loop handles many connections with non-blocking input and output.
  • Ryan Dahl introduced Node.js in 2009, and the npm registry followed in 2010.
  • Deep dependency trees in npm have enabled supply chain attacks.

Related entries

Technology

JavaScript

Programming

High-level programming language of the web, created at Netscape in 1995, that runs in every major browser and on servers through runtimes like Node.js.

Glossary term

Event Loop

Programming

Programming construct that repeatedly waits for events, such as user input or completed network requests, and dispatches each to its handler.

Glossary term

Programming approach that lets a program start long-running operations, such as network requests, and continue other work until the results arrive.

Glossary term

Package Manager

ProgrammingFOSS

Tool that automates installing, upgrading, configuring and removing software packages and their dependencies from shared repositories.

Glossary term

Attack that compromises software by tampering with its dependencies, build systems or update channels, so trusted code delivers malicious changes to users.

Technology

TypeScript

Programming

Programming language developed by Microsoft that adds optional static types to JavaScript and compiles to plain JavaScript for any runtime.

Technology

Vite

Programming

Front-end build tool and development server, created by Evan You, that uses native browser modules for fast startup and near-instant updates.

Technology

React

Programming

Open-source JavaScript library from Meta for building user interfaces out of reusable components that update efficiently when data changes.

Referenced by

Other entries that discuss or point to Node.js.