Skip to content
Devgo

Node.js

A runtime that lets you run JavaScript outside the browser, on servers. Built on Chrome's V8 engine. Lets you use one language (JavaScript/TypeScript) for both frontend and backend. Non-blocking I/O via the event loop makes it great for APIs and real-time apps.

Created by

Ryan Dahl · Created Node.js in 2009, also created Deno

When to use
  • Backend APIs (REST, GraphQL).
  • Real-time apps (chat, WebSockets).
  • Full-stack JS/TS projects.
  • CLI tools and build scripts.
When not to
  • CPU-intensive compute (use Go/Rust/Python+native).
  • Systems programming.

Definition

is a runtime built on V8, with a non-blocking event loop and libuv for async I/O. npm is the package manager. You build servers, CLIs, and tools. Frameworks: (minimal), Fastify (fast), (full-stack). Single-threaded but async.

Why it exists

To let developers use on the server, enabling full-stack JS and sharing code/types between frontend and backend. The event loop handles many concurrent connections efficiently without thread-per-connection.

How it works

V8 executes JS; libuv provides the event loop and async I/O (file, network). Non-blocking calls use callbacks/promises/async-await. One thread runs JS; worker threads and child processes add parallelism. npm installs packages from the registry.

Scaling limits

Single-threaded for JS (CPU work blocks the event loop). Use worker threads or child processes for CPU-heavy tasks. Callback/promise chains can get complex (async/await helps). npm dependency trees can be huge.

Cost shape

Free and open source.

Alternatives

  • Deno — Same V8 but secure-by-default, TS built-in, smaller ecosystem.
  • Bun — Faster runtime, less mature.

Failure modes

  • Blocking the event loop.
  • npm dependency hell.
  • Callback hell (use async/await).

, , ,