TGViewer
Coding Interview Preparation Coding Interview Preparation @coding_interview_preparation · 5.9K subscribers
Post #1335 697
💻 Backend Basics Interview Questions – (Node.js)

📍 1. What is Node.js?
Answer: Node.js is a runtime environment that lets you run JavaScript on the server side. It uses Google’s V8 engine and is designed for building scalable network applications.

📍 2. How is Node.js different from traditional server-side platforms?
Answer: Unlike PHP or Java, Node.js is event-driven and non-blocking. This makes it lightweight and efficient for I/O-heavy operations like APIs and real-time apps.

📍 3. What is the role of the package.json file?
Answer: It stores metadata about your project (name, version, scripts) and dependencies. It’s essential for managing and sharing Node.js projects.

📍 4. What are CommonJS modules in Node.js?
Answer: Node uses CommonJS to handle modules. You use require() to import and module.exports to export code between files.

📍 5. What is the Event Loop in Node.js?
Answer: It allows Node.js to handle many connections asynchronously without blocking. It’s the heart of Node’s non-blocking architecture.

📍 6. What is middleware in Node.js (Express)?
Answer: Middleware functions process requests before sending a response. They can be used for logging, auth, validation, etc.

📍 7. What is the difference between process.nextTick(), setTimeout(), and setImmediate()?
Answer:
⦁ process.nextTick() runs after the current operation, before the next event loop.
⦁ setTimeout() runs after a minimum delay.
⦁ setImmediate() runs on the next cycle of the event loop.

📍 8. What is a callback function in Node.js?
Answer: A function passed as an argument to another function, executed after an async task finishes. It’s the core of async programming in Node.

📍 9. What are Streams in Node.js?
Answer: Streams let you read/write data piece-by-piece (chunks), great for handling large files. Types: Readable, Writable, Duplex, Transform.

📍 10. What is the difference between require and import?
Answer:
⦁ require is CommonJS (used in Node.js by default).
⦁ import is ES6 module syntax (used with "type": "module" in package.json).
  • ❤ 2
More from @coding_interview_preparation
  1. Oct 8, 2026If you're prepping for system design interviews, this repo is gold It contains a curated,…
  2. Oct 6, 2026document post
  3. Oct 4, 2026💼 Why Your Resume Gets Rejected Before a Human Reads It You may have good skills and proj…
  4. Oct 2, 2026🧠 Coding Myths You Should Stop Believing There's a lot of advice online about learning to…
  5. Oct 1, 2026Most Asked Topics in AI Engineer Interviews Based on 2026 candidate reports
  6. Sep 30, 2026💼 What Companies Actually Look For in a Fresher Think companies only care about your CGPA…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →