What is Node.js?
Direct answer
Node.js is a JavaScript runtime built on Chrome's V8 engine — it runs JavaScript outside the browser on servers, CLIs, and tools, using a single-threaded event loop with non-blocking I/O for concurrent I/O-heavy workloads.
Node.js is not a programming language and not a web framework — it is a runtime environment that executes JavaScript with APIs for files, networking, processes, and cryptography. Ryan Dahl released it in 2009; the OpenJS Foundation maintains it today.
Why interviewers ask this
They want to hear runtime vs framework vs library — and why companies (Netflix, LinkedIn, Uber) choose Node for I/O-bound APIs, real-time apps, and tooling — not CPU-heavy batch jobs without mitigation.
- V8 — compiles JavaScript to native machine code; same engine as Chrome.
- libuv — C library providing the event loop, thread pool, and async I/O (Q8).
- npm ecosystem — largest package registry; Express, Fastify, NestJS sit on top of Node.
- One language full-stack — share types and validation between React frontend and Node API (AceDevHub stack).
import http from "node:http";
const server = http.createServer((req, res) => {
res.writeHead(200, { "Content-Type": "text/plain" });
res.end("Hello from Node.js");
});
server.listen(4000, () => {
console.log("API listening on http://localhost:4000");
});