Last updated: June 26, 2026
10 of 10 questions
Node.js is a JavaScript runtime built on V8 with a non-blocking, event-driven I/O model, well-suited to scalable network and I/O-bound applications.
libuv runs phases (timers, pending callbacks, poll, check, close) each tick, with microtasks and process.nextTick draining between phases.
CommonJS uses synchronous require/module.exports; ESM uses static import/export, is asynchronous, supports top-level await, and is enabled via .mjs or "type":"module".
Streams process data in chunks as it arrives instead of buffering it all in memory, enabling efficient handling of large files and network data.
Middleware are functions with (req, res, next) that run in sequence to process a request — parsing bodies, authenticating, logging — before the route handler.
Use try/catch with async/await, handle callback error-first arguments, propagate via next() in Express, and add global handlers as a last resort.
package.json describes the project, its scripts, and dependencies. dependencies are needed at runtime; devDependencies only for development and building.
Run multiple processes — via the cluster module, a process manager like PM2, or container replicas — since one Node process uses a single main thread.
Validate all input, use parameterised queries, set security headers, keep secrets out of code, manage dependencies, and never trust client data.
Use worker threads for CPU-intensive tasks that would block the event loop — parsing, encryption, image processing — keeping the main thread responsive.
Upload your resume and get an instant ATS score with keyword gaps — free, no sign-up.
Advanced Node.js Interview Questions
10 questions
JavaScript Interview Questions
50 questions
Next.js Interview Questions