Published on

Node Js Interview Questions .md file

Authors
  • avatar
    Name
    Ganesh Negi
    Twitter

Beginner-Level Questions

What is Node.js, and how does it work?

What is the difference between Node.js and JavaScript?

What are the key features of Node.js?

What is an event loop in Node.js?

Explain the difference between synchronous and asynchronous programming.

What is the purpose of require() in Node.js?

How do you create a simple server using Node.js?

What is NPM (Node Package Manager)?

What is the difference between dependencies and devDependencies in package.json?

Intermediate-Level Questions

What is middleware in Express.js?

What are streams in Node.js?

What is the difference between fs.readFile() and fs.createReadStream()?

Explain the difference between setImmediate(), process.nextTick(), and setTimeout().

What is the difference between CommonJS and ES6 modules?

How do you handle errors in Node.js?

What is a callback function in Node.js?

What is the purpose of the util module in Node.js?

How do you use environment variables in Node.js?

What is CORS, and how do you enable it in Node.js?

Advanced-Level Questions

What is the difference between cluster mode and worker threads in Node.js?

How does Node.js handle concurrency and multi-threading?

What are child processes in Node.js?

How do you handle memory leaks in a Node.js application?

What is the purpose of buffer in Node.js?

What is the difference between spawn, exec, and fork in Node.js?

How do you secure a Node.js application?

What is the crypto module used for in Node.js?

Explain JWT (JSON Web Tokens) authentication in Node.js.

How does WebSockets work in Node.js?