Node.js
Node.js is an open-source, cross-platform JavaScript runtime built on Chrome's V8 engine that executes JavaScript outside the browser. It is the standard runtime for server-side JavaScript development.
§ 1 Definition
Node.js was created by Ryan Dahl in 2009 to run JavaScript on the server, breaking the browser's monopoly on the language. Built on Chrome's V8 engine, Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient for data-intensive real-time applications. Its package ecosystem, npm, is the largest software registry in the world. Node.js excels at I/O-bound workloads: API servers, web socket servers, streaming services, and CLI tools. It is not suitable for CPU-heavy tasks (video encoding, image processing) without offloading to worker threads. Node.js 22 (stable as of 2025) added native WebSocket support, a built-in test runner, and improved TypeScript support through type stripping.
§ 2 Event Loop and Non-Blocking I/O
Node.js runs on a single thread using an event loop. When you make an I/O operation (read a file, query a database, call an API), Node.js does not wait. It registers a callback and continues executing other code. When the I/O completes, the callback is added to the event loop queue. This single-threaded, non-blocking model is what makes Node.js handle thousands of concurrent connections with minimal memory. The event loop has phases: timers, pending callbacks, idle/prepare, poll, check (setImmediate), and close callbacks.
§ 3 npm and Ecosystem
npm (Node Package Manager) ships with Node.js and provides access to over 2 million packages. The npm registry is the largest package ecosystem in any programming language. While this abundance is powerful, it also creates risk: supply-chain attacks, dependency bloat, and the infamous node_modules problem. Modern best practices include using package-lock.json for reproducible builds, auditing dependencies with npm audit, and using tools like Socket.dev or Snyk for security scanning.
§ 4 Common Use Cases
Node.js excels in several domains. API servers and microservices benefit from its non-blocking I/O for handling many concurrent requests. Real-time applications (chat, live updates, collaborative editing) use WebSocket libraries like Socket.IO. CLI tools are natural fits because Node.js works cross-platform. Proxy servers and middleware layers benefit from its streaming capabilities. Streaming services (video, audio, large file processing) use Node's stream API for memory-efficient data processing.
§ 5 Note
§ 6 In code
```javascript
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('Server running on http://localhost:3000');
});
```§ 7 Common questions
- Q. Is Node.js a framework or a runtime?
- A. Node.js is a runtime, not a framework. It provides the environment to run JavaScript on the server. Express.js and NestJS are frameworks that run on top of Node.js.
- Q. Should I use Node.js or Deno?
- A. Node.js has the larger ecosystem and is the safer choice for production applications. Deno has modern defaults (TypeScript natively, security by default) but a smaller ecosystem. Node.js with proper tooling covers the same ground with more community support.
- Node.js is a JavaScript runtime built on Chrome's V8 engine for server-side execution.
- Event-driven, non-blocking I/O model handles thousands of concurrent connections efficiently.
- npm is the largest package ecosystem in the world, with over 2 million packages.
- Best for I/O-bound workloads; pair with worker threads for CPU-intensive tasks.
Atomic Glue builds and deploys Node.js backends for API servers, real-time features, and full-stack applications. Our Milwaukee team uses Node.js as the runtime layer for our Web Development services, pairing it with TypeScript for type safety and Express.js or Fastify for routing. If you need a backend that handles real-time data, integrates with third-party APIs, or serves your front-end, Node.js is our standard runtime of choice. Get in touch to discuss your project.
Get in touchNode.js is an open-source, cross-platform JavaScript runtime built on Chrome's V8 engine that executes JavaScript outside the browser. It is the standard runtime for server-side JavaScript development.
Category: Backend (also: Software Engineering, Front End)
Author: Atomic Glue Development Team
## Definition
Node.js was created by Ryan Dahl in 2009 to run JavaScript on the server, breaking the browser's monopoly on the language. Built on Chrome's V8 engine, Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient for data-intensive real-time applications. Its package ecosystem, npm, is the largest software registry in the world. Node.js excels at I/O-bound workloads: API servers, web socket servers, streaming services, and CLI tools. It is not suitable for CPU-heavy tasks (video encoding, image processing) without offloading to worker threads. Node.js 22 (stable as of 2025) added native WebSocket support, a built-in test runner, and improved TypeScript support through type stripping.
## Event Loop and Non-Blocking I/O
Node.js runs on a single thread using an event loop. When you make an I/O operation (read a file, query a database, call an API), Node.js does not wait. It registers a callback and continues executing other code. When the I/O completes, the callback is added to the event loop queue. This single-threaded, non-blocking model is what makes Node.js handle thousands of concurrent connections with minimal memory. The event loop has phases: timers, pending callbacks, idle/prepare, poll, check (setImmediate), and close callbacks.
## npm and Ecosystem
npm (Node Package Manager) ships with Node.js and provides access to over 2 million packages. The npm registry is the largest package ecosystem in any programming language. While this abundance is powerful, it also creates risk: supply-chain attacks, dependency bloat, and the infamous node_modules problem. Modern best practices include using package-lock.json for reproducible builds, auditing dependencies with npm audit, and using tools like Socket.dev or Snyk for security scanning.
## Common Use Cases
Node.js excels in several domains. API servers and microservices benefit from its non-blocking I/O for handling many concurrent requests. Real-time applications (chat, live updates, collaborative editing) use WebSocket libraries like Socket.IO. CLI tools are natural fits because Node.js works cross-platform. Proxy servers and middleware layers benefit from its streaming capabilities. Streaming services (video, audio, large file processing) use Node's stream API for memory-efficient data processing.
## Note
Common misunderstanding: Node.js is not single-threaded in any meaningful way that limits modern applications. While the event loop runs on one thread, worker threads (added in v10.5) handle CPU-intensive work, and the libuv thread pool handles async I/O. Calling Node.js 'single-threaded' without qualification is misleading. Another mistake: thinking Node.js is only for web servers. It powers CLI tools (VS Code is built on Electron, which uses Node.js), build tools (Vite, webpack), IoT devices, and desktop applications.
## In code
## Common questions Q: Is Node.js a framework or a runtime? A: Node.js is a runtime, not a framework. It provides the environment to run JavaScript on the server. Express.js and NestJS are frameworks that run on top of Node.js. Q: Should I use Node.js or Deno? A: Node.js has the larger ecosystem and is the safer choice for production applications. Deno has modern defaults (TypeScript natively, security by default) but a smaller ecosystem. Node.js with proper tooling covers the same ground with more community support.
## Key takeaways
- Node.js is a JavaScript runtime built on Chrome's V8 engine for server-side execution.
- Event-driven, non-blocking I/O model handles thousands of concurrent connections efficiently.
- npm is the largest package ecosystem in the world, with over 2 million packages.
- Best for I/O-bound workloads; pair with worker threads for CPU-intensive tasks.
## Related entries
- [Express.js](atomicglue.co/glossary/express-js)
- [JavaScript](atomicglue.co/glossary/javascript)
- [Node.js](atomicglue.co/glossary/node-js)
Last updated June 2026. Permalink: atomicglue.co/glossary/node-js