Skip to main content

Node.js

Pronunciation
NOHD-jay-ES
Updated 2 min read

Share this page

Send the link, quote the definition with a link back, or show it as a card on your own site.

https://softwaredictionary.org/terms/nodejs

In short

Node.js is an open-source JavaScript runtime that runs JavaScript outside the browser, most often to build web servers, APIs, and command-line tools.

What is Node.js?

Node.js is a runtime environment that lets you run JavaScript on a server or on your own computer, not only inside a web browser. It is built on V8, the JavaScript engine from Google Chrome, and was first released by Ryan Dahl in 2009. Node.js is not a programming language or a framework; it is the program that executes your JavaScript and gives it access to files, the network, and the operating system.

Node.js handles work with a single-threaded event loop and non-blocking I/O (input and output, such as reading files or talking to a database). When your code starts a slow operation, Node.js doesn't wait; it moves on to other work and runs a callback, or resumes an async function, when the result is ready. This makes it very efficient at handling many simultaneous connections, such as API requests or WebSocket chats.

Picture a single waiter who takes an order, passes it to the kitchen, and serves other tables while the food cooks, instead of standing at the kitchen door. Node.js ships with npm, the package manager behind the largest registry of open-source JavaScript packages, and it powers frameworks such as Express, Fastify, NestJS, and Next.js as well as most frontend build tools.

Because your JavaScript runs on one main thread, CPU-heavy work such as image processing or large calculations can block every other request until it finishes. Such tasks are usually moved to worker threads, separate processes, or other services. Node.js is also often compared with newer runtimes like Deno and Bun, which run mostly the same JavaScript but differ in built-in tooling and defaults.

Key takeaways

  • Node.js runs JavaScript outside the browser, on servers and developer machines.
  • It is a runtime built on Chrome's V8 engine, not a language or a framework.
  • A non-blocking event loop lets one process handle many concurrent connections.
  • CPU-heavy work can block the event loop and should be moved elsewhere.
  • npm gives access to a huge ecosystem of open-source packages.

Example

A minimal web server with built-in modulesjavascript
// server.mjs: a tiny JSON API with no external packages
import { createServer } from "node:http";

const server = createServer((req, res) => {
  res.writeHead(200, { "Content-Type": "application/json" });
  res.end(JSON.stringify({ message: "Hello from Node.js" }));
});

server.listen(3000, () => {
  console.log("Listening on http://localhost:3000");
});

// Run it with: node server.mjs

Readers ask

Is Node.js a programming language?

No. JavaScript is the programming language, and Node.js is a runtime environment that executes it. Node.js adds APIs for files, networking, and processes that browsers don't provide.

Is Node.js frontend or backend?

Node.js runs on servers and developer machines, so it is mainly used for backend code. Frontend developers also rely on it every day to run build tools, bundlers, and local development servers.

Is Node.js single-threaded?

Your JavaScript runs on a single main thread driven by the event loop, but Node.js uses a background thread pool for some I/O tasks. You can also create extra threads with the worker_threads module for CPU-heavy work.

See also

Spotted a mistake or something missing on this page?Suggest an edit

Read a random page
Open today's review
Switch to the dark theme
Read this page in Türkçe

More

Settings