Node.js Interview Questions
The event loop, streams, Express, EventEmitter, clustering, worker threads and REST APIs.
61 questions
Popular Searches
1. What is Node.js and How Does it Work?
easyFundamentals 6 mins2. How Does the Event Loop Work in Node.js?
hardCore 8 mins3. What is npm in Node.js?
easyTooling 6 mins4. CommonJS vs ES Modules in Node.js
mediumModules 6 mins5. What is Express.js?
easyFrameworks 5 mins6. What is Middleware in Express.js?
mediumFrameworks 6 mins7. What is the EventEmitter in Node.js?
mediumCore 7 mins8. What are Streams in Node.js?
hardCore 8 mins9. What are Buffers in Node.js?
mediumCore 6 mins10. Blocking vs Non-Blocking Code in Node.js
mediumCore 7 mins11. What are Error-First Callbacks in Node.js?
easyAsync 6 mins12. What is the process Object in Node.js?
easyCore 6 mins13. How Do Environment Variables Work in Node.js?
easyCore 6 mins14. What is the Cluster Module in Node.js?
hardScaling 8 mins15. What are Worker Threads in Node.js?
hardScaling 8 mins16. What are Child Processes in Node.js?
mediumScaling 6 mins17. What is libuv in Node.js?
hardInternals 7 mins18. What is the difference between package.json and package-lock.json?
easyTooling 5 mins19. How Does the fs Module Work in Node.js?
easyModules 6 mins20. How Do You Create an HTTP Server in Node.js?
easyNetworking 6 mins21. How Do You Handle CORS in Node.js?
mediumNetworking 7 mins22. How Does JWT Authentication Work in Node.js?
mediumSecurity 7 mins23. What is util.promisify in Node.js?
mediumAsync 6 mins24. process.nextTick vs setImmediate in Node.js
hardCore 7 mins25. What are Global Objects in Node.js?
easyCore 6 mins26. How Do You Handle Uncaught Exceptions in Node.js?
mediumError Handling 7 mins27. How Do You Build a REST API with Express.js?
mediumFrameworks 8 mins28. What are Caching Strategies in Node.js?
mediumPerformance 7 mins29. What are Security Best Practices in Node.js?
mediumSecurity 7 mins30. How Do You Detect Memory Leaks in Node.js?
hardPerformance 8 mins31. What is the Event Loop in Node.js?
easyCore Concepts 6 mins32. What is a Callback in Node.js?
easyCore Concepts 5 mins33. What are Streams in Node.js?
easyCore Concepts 6 mins34. What is the Cluster Module in Node.js?
mediumScaling & Performance 6 mins35. What is package.json in Node.js?
mediumTooling & Ecosystem 5 mins36. What is Nodemon in Node.js?
mediumTooling & Ecosystem 4 mins37. What is REST in Express.js?
mediumExpress & APIs 6 mins38. What is JWT Authentication in Node.js?
mediumSecurity & Auth 7 mins39. What is the require Function in Node.js?
mediumCore Concepts 5 mins40. What is EventEmitter in Node.js?
mediumCore Concepts 6 mins41. What is a Buffer in Node.js and why does it exist?
hard 6 mins42. What is process.env in Node.js and how do you use it for configuration?
hard 6 mins43. What is the error-first callback pattern in Node.js?
hard 6 mins44. What is the difference between Node.js and browser JavaScript?
hard 7 mins45. Walk through the phases of the Node.js event loop and explain where each kind of callback actually runs.
hardRuntime internals 9 mins46. How do you detect and diagnose event-loop blocking in a production Node.js service?
hardDiagnostics 9 mins47. When would you choose worker_threads over child_process or cluster in Node.js?
hardConcurrency 9 mins48. What is back-pressure in Node.js streams, and why should you use pipeline instead of pipe?
hardStreams 9 mins49. What are the safety pitfalls of Buffer allocation and slicing in Node.js?
hardBinary data 9 mins50. How does AsyncLocalStorage propagate request context in Node.js, and what are its limits?
hardAsync context 9 mins51. How do you implement graceful shutdown and connection draining in a Node.js HTTP service?
hardOperations 10 mins52. How would you diagnose a slow memory leak in a long-running Node.js process?
hardDiagnostics 10 mins53. What practical problems do ESM loading and native addons cause in a Node.js codebase?
hardModules and native code 10 mins54. How should a production service handle uncaughtException versus unhandledRejection in Node.js?
hardError handling 10 mins55. How do HTTP keep-alive and agent pooling affect outbound request performance in Node.js?
hardNetworking 10 mins56. What is diagnostics_channel in Node.js and when would you use it instead of monkey-patching?
hardObservability 9 mins57. How do you keep a Node.js project's dependency supply chain safe?
hardSecurity 10 mins58. How do you cancel in-flight asynchronous work in Node.js with AbortController?
mediumAsync control 9 mins59. How would you process a very large JSON payload in Node.js without exhausting memory?
hardStreams 10 mins60. Why does a Node.js container get OOM-killed even though the heap looks fine, and how do you size it?
hardOperations 10 mins61. What runs on the libuv thread pool, and when would you change UV_THREADPOOL_SIZE?
hardRuntime internals 9 mins