What is Node.js and why is it called single-threaded?
Node.js is a JavaScript runtime built on Chrome's V8 engine that runs your JavaScript on a single main thread and uses non-blocking I/O, so one thread can handle many concurrent connections.
Backend 路 Intern to senior
Node.js interviews focus on how a single-threaded runtime handles many concurrent requests and what can go wrong when you block it. Beginners are asked about modules, npm and Express; mid-level candidates about the event loop phases, streams and authentication; senior candidates about scaling, clustering and keeping the event loop healthy.
4 of 9 questions match
Clear filtersNode.js is a JavaScript runtime built on Chrome's V8 engine that runs your JavaScript on a single main thread and uses non-blocking I/O, so one thread can handle many concurrent connections.
package.json lists your project's dependencies with allowed version ranges, while package-lock.json records the exact versions that were installed so every machine gets an identical dependency tree.
require is the CommonJS module system, which loads modules synchronously at runtime, while import is the ES module standard, which is statically analysed, asynchronous and supports top-level await and tree shaking.
Middleware are functions that receive the request, response and a next callback; they run in the order they are registered and can modify the request, end the response or pass control on with next().