Exambodh - योग्यता, रीजनिंग और GK प्रश्नों का अभ्यास
UPlay Quiz

यह सामग्री अभी उपलब्ध नहीं है। Questions and Answers

यह सामग्री अभी उपलब्ध नहीं है।

Exams Covered:

SSC CGL
SSC CHSL
SSC MTS
IBPS PO
IBPS Clerk
RRB NTPC
UPSC
State Exams
& More

process.nextTick() vs setImmediate()?

Cluster module क्या है?

Stream क्या है?

REST API क्या है?

Promise.all() किस लिए?

Page
˅
of 2

FAQ

यह सामग्री अभी उपलब्ध नहीं है। FAQs

Common questions and clear answers for this topic.

What is Node.js and what makes it different from browser JavaScript?

Node.js is a JavaScript runtime environment built on Chrome's V8 engine that allows JavaScript to run on the server side. Key features: non-blocking asynchronous I/O, event-driven architecture, single-threaded with event loop, npm (Node Package Manager) with millions of packages. Node.js is used for building REST APIs, real-time applications, streaming services, and microservices.

What is npm and what is the purpose of package.json?

npm (Node Package Manager) is the default package manager for Node.js. package.json is the project manifest file that contains: project name and version, list of dependencies (packages the project needs), devDependencies (tools for development), and scripts (npm run commands). npm install reads package.json and installs all dependencies in the node_modules folder.

What is the difference between require() and import in Node.js?

require() is CommonJS module syntax used in older Node.js versions. It is synchronous and loads modules at runtime. import/export is ES Module syntax, statically analyzed at compile time, and supports tree-shaking. To use ES Modules in Node.js, add type: module in package.json or use .mjs extension. Modern Node.js supports both, but many packages still use CommonJS.

What is Express.js and how is it used with Node.js?

Express.js is the most popular web framework for Node.js that simplifies building RESTful APIs and web applications. It provides: routing (GET, POST, PUT, DELETE), middleware support, template engines, error handling, and static file serving. Express is minimal and unopinionated, making it flexible for building any type of Node.js application. It is the most widely used Node.js framework.

What is the Node.js Event Loop and how does it handle asynchronous operations?

The Node.js Event Loop allows Node.js to perform non-blocking I/O operations despite JavaScript being single-threaded. When async operations (file read, database query, HTTP request) are initiated, they are delegated to the OS or thread pool. When complete, callbacks are placed in the event queue. The event loop processes callbacks when the call stack is empty, enabling handling thousands of concurrent connections.

Related Practice

Parent category aur related practice pages se apni preparation continue karein.

Top 5 Topics

Open high-value topics for stronger internal linking.