Before 2009, JavaScript only ran inside a browser. Node.js changed that by taking Chrome's V8 engine and embedding it in a standalone runtime that can read files, open network connections, and talk to databases — the things a server needs to do. That single decision is why a huge share of modern APIs, including the ones powering this website, are written in JavaScript end-to-end.
Most traditional server languages handle each incoming request with its own thread, which works but doesn't scale well once you have thousands of simultaneous connections — each thread consumes memory whether it's doing real work or just waiting.
Node.js instead runs on a single thread with an event loop. When a request needs something slow — reading a file, querying a database, calling another API — Node hands that operation off and immediately moves to the next task instead of waiting. When the slow operation finishes, a callback fires and Node picks the result back up. This is what "non-blocking I/O" means in practice.
This model makes Node.js extremely efficient for I/O-heavy workloads: REST APIs, real-time chat apps, streaming services, and anything that spends most of its time waiting on a database or network call rather than doing heavy computation.
It's less ideal for CPU-heavy tasks like video encoding or complex mathematical processing, since those would block the single thread. For those cases, Node offers worker threads, or you'd offload the work to a separate service.
const http = require('http');
const server = http.createServer((req, res) => { res.writeHead(200, { 'Content-Type': 'text/plain' }); res.end('Hello from Node.js'); });
server.listen(3000);
This alone is a fully working web server — no external framework required. In practice, almost every real project builds on top of Express.js (covered in the next article in this series) rather than the raw `http` module, for cleaner routing and middleware support.
Node.js didn't just let JavaScript run on servers — its event-driven, non-blocking model became the standard approach for building APIs that need to handle many simultaneous users efficiently. If you already know JavaScript from the frontend, Node.js is the most direct path to becoming a full stack developer.
Neither — Node.js is a JavaScript runtime environment. It lets you execute JavaScript code outside a browser, on a server or your local machine, using the same language syntax you already know from frontend development.
Yes, especially if you already know JavaScript. You avoid learning a second language for backend work, and the npm ecosystem means you rarely have to build common functionality from scratch.
Netflix, PayPal, LinkedIn, Uber, and Walmart all run significant parts of their backend infrastructure on Node.js, largely because of its efficiency handling large numbers of concurrent connections.