Basics of Node.js
1. What is Node.js?
2. Explain the event-driven architecture of Node.js.
3. How does Node.js handle asynchronous operations?
4. What is the CommonJS module system in Node.js?
5. What is npm, and what is its purpose in Node.js development?
Node.js Core Concepts
6. What is the Node.js event loop?
7. Describe the difference between callback functions and promises in Node.js.
8. What are streams in Node.js, and why are they useful?
9. Explain the role of the 'require' function in Node.js.
10. How does Node.js handle multi-threading?
Working with Modules and Packages
11. What are built-in modules in Node.js?
12. What is the difference between 'dependencies' and 'devDependencies' in package.json?
Node.js Runtime Environment
13. What is the process object in Node.js?
14. How can you exit a Node.js process gracefully?
15. Explain the concept of child processes in Node.js.
16. What is the role of the 'os' module in Node.js?
Asynchronous Programming
17. What is a callback function, and how is it used in Node.js?
18. How can you handle errors in Node.js callback functions?
19. Describe the purpose of the 'async' and 'await' keywords in Node.js.
20. What is the 'Promise.all' method used for in Node.js?
Event Emitters
21. What is an event emitter in Node.js, and how does it work?
22. Explain the difference between 'addListener' and 'on' methods in event emitters.
File System Operations
23. How can you read a file asynchronously in Node.js?
24. Explain the difference between 'fs.readFileSync' and 'fs.readFile'.
25. What is 'fs.writeFileSync' used for?
26. How do you create and delete directories in Node.js using the 'fs' module?
Networking and Web Development
27. What is the 'http' module in Node.js?
28. How can you create a simple HTTP server in Node.js?
29. Explain the role of the 'express' framework in Node.js web development.
30. What is middleware in Express.js?
31. How do you handle routing in Express.js?
Security and Performance
32. What is Cross-Origin Resource Sharing (CORS), and how can you enable it in an Express.js application?
33. How can you mitigate common security vulnerabilities in Node.js applications?
34. Describe Node.js clustering and its advantages.
35. What is Docker, and how can it be used for Node.js application deployment?
Design Patterns
36. What is the Singleton design pattern, and how can it be implemented in Node.js?
37. How do you handle memory leaks in a long-running Node.js application?
Advanced Topics
38. What is a callback hell, and how can you avoid it in Node.js?
39. Explain the concept of serverless computing and how it relates to Node.js.
40. How do you handle WebSocket communication in Node.js?