Glossary · Web Development

Node.js

Node.js is a JavaScript runtime that executes JavaScript outside the browser, commonly used to build web servers, APIs and front-end build tools.

Updated October 6, 2026

Node.js is an open-source runtime built on Chrome's V8 engine that lets you run JavaScript on a server or your own computer. It uses an event-driven, non-blocking I/O model, which suits handling many concurrent network connections.

Why it matters

Node.js lets teams use one language across front end and back end, and it powers most modern build tooling, including bundlers and development servers. It excels at I/O-heavy work such as APIs and WebSockets, but a single CPU-heavy task can block the event loop and stall every request.

Example

const http = require('http');
http.createServer((req, res) => {
  res.writeHead(200, { 'Content-Type': 'text/plain' });
  res.end('OK');
}).listen(3000);

Visiting http://localhost:3000 returns the text OK with status 200.

Common mistakes

  • Running CPU-intensive work on the main thread, which freezes all other requests.
  • Not handling uncaught exceptions, so the process exits and the site goes down until restarted.
  • Running it without a process manager or restart policy in production.

Get notified when this term updates

Plus occasional practical tips on uptime and monitoring, nothing else. Unsubscribe anytime.

This page is general information written by our editorial team and updated when documentation changes. Servers and providers differ, so test changes safely first. See our editorial policy and disclaimer.