Node.js Runtime
Node.js is a runtime that runs JavaScript outside the browser, on the server and in tools. Built on Chrome's V8 engine, it adds APIs for files, networking, and processes so JavaScript can build backends and CLI programs.
Node.js
Before Node, JavaScript lived only in the browser. Node took V8 — Chrome's fast JavaScript engine — out of the browser and wrapped it with system-level APIs (file system, HTTP, OS, child processes), letting you write servers, build tools, and scripts entirely in JavaScript.
Its defining design is an event-driven, non-blocking I/O model: instead of waiting on slow operations like disk or network, Node registers callbacks and keeps handling other work, making it efficient for I/O-heavy workloads such as APIs and real-time apps.
Node is single-threaded for your JavaScript code but offloads I/O and some CPU work to a thread pool (libuv) under the hood. Its huge npm ecosystem and the same language on front and back end are why it became a standard for web backends and tooling.
Syntax
node app.jsExamples
JavaScript
// app.js
console.log("Running on Node", process.version);Output:
Running on Node v20.x.x