web dev//runtime//Node.js

Node.js is a JavaScript runtime that runs JavaScript outside the browser, as a server process. It uses V8 as its engine and adds APIs that do not exist in the browser: filesystem, networking, crypto, child processes.


Node.js is a JavaScript runtime that runs JavaScript outside the browser, as a server process. It uses V8 as its engine and adds APIs that do not exist in the browser: filesystem, networking, crypto, child processes.

A Node.js process runs around the clock waiting for requests (the traditional server model), which sets it apart from Workers: Node.js is a persistent process with system access, while Workers are ephemeral functions with access to cloud services.

Each Node.js program runs as one OS process and can spawn child processes. npm installs its packages and npx runs one-off tools, while a version manager decides which Node.js version a project gets; together they are the toolchain of the Node.js ecosystem, and Express is its most popular web framework. Wrangler locally simulates what a Node.js or Express server would do, but runs the code in an environment that mimics Cloudflare: the same code gives the same result without Node as the server.