07 November 2020

#NodeJs

#NodeJs

Key Concepts


S.No Topic Sub-Topics
1IntroductionWhat is Node.js, Architecture, Features, V8 Engine, Event Loop
2Node BasicsREPL, Node CLI, First Script, Modules, CommonJS vs ES Modules
3Core Modulesfs, path, os, process, util
4Event LoopCall Stack, Event Queue, Libuv, Async Model, Microtasks
5Asynchronous ProgrammingCallbacks, Promises, Async/Await, Error Handling, Timers
6NPM Basicspackage.json, Installing Packages, Semantic Versioning, Scripts, npx
7Package ManagementGlobal vs Local Modules, Dependencies, DevDeps, package-lock.json, yarn
8HTTP Serverhttp Module, Create Server, Routing, Status Codes, Headers
9Express BasicsSetup, Routing, Middleware, Static Files, Template Engines
10Express Deep DiveRouter, Error Handling, Cookies, Sessions, Helmet.js
11APIsREST API, Query Params, Route Params, JSON Handling, Postman
12Database BasicsSQL vs NoSQL, MongoDB, Mongoose, Models, CRUD
13Advanced MongoDBSchema Design, Aggregation, Indexes, Validation, Transactions
14AuthenticationJWT, Bcrypt, Access Tokens, Refresh Tokens, Role Based Access
15AuthorizationRBAC, ABAC, Passport.js, OAuth, Sessions
16LoggingWinston, Morgan, Log Levels, Log Rotation, Request Logging
17ValidationJoi, Yup, Express-Validator, Error Handling, Input Sanitization
18CachingRedis, in-memory cache, TTL, Caching Headers, ETag
19Testing BasicsMocha, Jest, Chai, Supertest, Unit vs Integration Testing
20Testing AdvancedMocking, Test Coverage, Test Hooks, CI/CD Testing, Automation
21Streams & BuffersReadable Streams, Writable Streams, Pipes, Chunking, Backpressure
22SecurityXSS, CSRF, CORS, SQL Injection, Rate Limiting
23PerformanceClustering, Load Balancing, PM2, Worker Threads, Profiling
24ScalingHorizontal Scaling, Vertical Scaling, Docker, Kubernetes, HA
25DevOpsCI/CD, GitHub Actions, AWS Basics, Environments, Secrets
26MicroservicesAPI Gateway, Service Registry, Message Queue, Kafka, RabbitMQ
27GraphQL BasicsSchema, Resolvers, Queries, Mutations, Apollo Server
28Real-time AppsWebSocket, Socket.io, Events, Broadcasting, Rooms
29Code QualityESLint, Prettier, Linters, Folder Structure, Environment Variables
30Project DeploymentProduction Build, Nginx, Reverse Proxy, Scaling, Logs

Interview question

Basic

  1. What is Node.js and how is it different from traditional web servers?
  2. Explain the role of V8 JavaScript engine in Node.js.
  3. What are the main features of Node.js?
  4. What is npm in Node.js?
  5. Explain the difference between Node.js and JavaScript in the browser.
  6. What is the purpose of package.json file?
  7. What is the difference between dependencies and devDependencies?
  8. What is an event loop in Node.js?
  9. What is a callback function? Provide an example.
  10. Explain synchronous vs asynchronous programming in Node.js.
  11. How do you install a package globally and locally using npm?
  12. What is the purpose of require() in Node.js?
  13. What is the difference between CommonJS and ES Modules?
  14. Explain how to read and write files using Node.js.
  15. What is a stream in Node.js? Name its types.
  16. How do you handle errors in Node.js?
  17. What is the difference between process.nextTick() and setImmediate()?
  18. What is REPL in Node.js?
  19. How do you exit from REPL?
  20. Explain how Node.js handles child processes.
  21. What is the difference between blocking and non-blocking code?
  22. How to create a simple HTTP server in Node.js?
  23. What is the purpose of Buffer class in Node.js?
  24. Explain the difference between fs.readFile and fs.readFileSync.
  25. How do you manage environment variables in Node.js?

Intermediate (26?50)

  1. What is middleware in Node.js?
  2. How does Express.js work in Node.js?
  3. Explain routing in Express.js with an example.
  4. What is CORS and how do you enable it in Node.js?
  5. How do you handle file uploads in Node.js?
  6. What are Promises in Node.js?
  7. Explain async/await with example in Node.js.
  8. How does event-driven programming work in Node.js?
  9. What is the role of cluster module?
  10. What is the difference between spawn and fork methods?
  11. How do you connect Node.js with MongoDB?
  12. What is Mongoose in Node.js?
  13. How do you connect Node.js with MySQL?
  14. What is JWT and how is it used in Node.js?
  15. Explain how sessions and cookies work in Node.js.
  16. How do you implement authentication in Node.js?
  17. What is Passport.js in Node.js?
  18. How do you handle exceptions globally in Node.js?
  19. What is Helmet.js and why is it used?
  20. How do you use dotenv in Node.js?
  21. Explain the difference between process.env and config module.
  22. What are worker threads in Node.js?
  23. What is Nodemon and why is it useful?
  24. How do you implement logging in Node.js applications?
  25. What is PM2 and how do you use it?

Advanced

  1. What is the internal architecture of Node.js?
  2. Explain the phases of event loop in Node.js.
  3. How does garbage collection work in Node.js?
  4. What is libuv and what role does it play?
  5. Explain the difference between microtasks and macrotasks.
  6. What is a memory leak in Node.js? How do you detect it?
  7. How do you optimize performance in Node.js applications?
  8. Explain clustering and load balancing in Node.js.
  9. What is Zero Downtime Deployment in Node.js?
  10. What is rate limiting and how to implement it in Node.js?
  11. How do you prevent SQL injection in Node.js?
  12. Explain the use of async hooks in Node.js.
  13. How do you debug Node.js applications?
  14. What is the difference between process.on('uncaughtException') and process.on('unhandledRejection')?
  15. What is TLS/SSL and how do you implement HTTPS in Node.js?
  16. How do you implement WebSockets in Node.js?
  17. What is Socket.IO and how does it differ from WebSockets?
  18. How do you test Node.js applications (unit/integration)?
  19. What is Mocha, Jest, and Chai in Node.js testing?
  20. How do you implement clustering with PM2?
  21. Explain the concept of backpressure in Node.js streams.
  22. What is the difference between Readable and Duplex streams?
  23. How do you monitor performance metrics in Node.js?
  24. What are async iterators in Node.js?
  25. Explain the use of EventEmitter in detail.

Expert

  1. Explain the Node.js module resolution algorithm.
  2. How does Node.js handle concurrency internally?
  3. What are native addons in Node.js?
  4. How do you build a custom C++ addon for Node.js?
  5. What are worker pools in libuv?
  6. Explain the difference between cooperative multitasking and preemptive multitasking in Node.js.
  7. How do you handle high throughput real-time applications in Node.js?
  8. What are observables and how do they compare to Promises in Node.js?
  9. Explain the difference between gRPC and REST in Node.js.
  10. How do you implement GraphQL in Node.js?
  11. How do you design a scalable microservices architecture with Node.js?
  12. What are the security best practices for Node.js applications?
  13. How do you implement OAuth2.0 in Node.js?
  14. Explain horizontal vs vertical scaling in Node.js.
  15. What are worker threads vs child processes? When to use each?
  16. How do you manage large-scale logging in Node.js?
  17. What are some advanced debugging tools for Node.js?
  18. How do you implement distributed caching in Node.js?
  19. What is the difference between Redis pub/sub and Socket.IO in Node.js?
  20. Explain the concept of CQRS with Node.js.
  21. How do you implement event sourcing with Node.js?
  22. What is Deno and how does it compare to Node.js?
  23. How do you contribute to Node.js core?
  24. What are the latest features introduced in the recent Node.js versions?
  25. How do you handle millions of concurrent connections in Node.js?

Related Topics