Node.js Developer Interview Questions & Answers
40 questions for Node.js Developer interviews — 29 easy, 11 medium.
About the Node.js Developer role
Builds and maintains server-side applications and REST APIs using Node.js and Express. Works with product and frontend teams to implement features, integrates databases and third-party services such as payment gateways and SMS providers, writes tests and fixes production bugs. Freshers usually start with CRUD APIs and gradually own complete modules.
What is the EventEmitter and how do you use it?
Show answer
What are streams in Node.js and what types exist?
Show answer
How does the this keyword behave in arrow functions compared to regular functions?
Show answer
A test passes locally but fails randomly in CI. How do you approach this flaky test?
Show answer
How do you use express.Router to organise routes?
Show answer
What is a REST API and what are its key constraints?
Show answer
A teammate uses fs.readFileSync inside an Express route. What is the problem and what would you suggest?
Show answer
What is a Promise and what are its states?
Show answer
How do you explain asynchronous programming to a non-technical stakeholder or junior teammate?
Show answer
Write a simple custom EventEmitter usage for an order service.
Show answer
Explain ACID properties of a database transaction.
Show answer
What is package.json and what is the difference between dependencies and devDependencies?
Show answer
What is the difference between var, let and const?
Show answer
How do you keep yourself updated about security best practices as a backend developer?
Show answer
What is the difference between throwing an error and rejecting a promise inside an async function?
Show answer
What is package-lock.json and why should it be committed?
Show answer
What is the difference between CommonJS and ES Modules in Node.js?
Show answer
Describe how you would mentor a junior developer who writes no tests.
Show answer
What is a closure and how is it used in Node.js code?
Show answer
Explain semantic versioning and the meaning of ^ and ~ in package.json.
Show answer
Write a retry function with exponential backoff for a flaky API call.
Show answer
What happens if you forget to await a promise inside a try/catch?
Show answer
How do you handle async errors in Express 4 routes?
Show answer
What is the difference between app.use and app.get?
Show answer
Why is using async callbacks inside forEach a common bug?
Show answer
Create a basic HTTP server in Node.js without any framework.
Show answer
Explain debounce and throttle and where they matter on the backend.
Show answer
How do you implement graceful shutdown in a Node.js server?
Show answer
What is the difference between res.send, res.json and res.end?
Show answer
What does helmet do in an Express application?
Show answer
A client reports that a large JSON POST request fails with 413 Payload Too Large. What do you do?
Show answer
How do you manage configuration for dev, staging and production environments?
Show answer
How do you enable CORS in an Express app and why is it needed?
Show answer
Describe a time you disagreed with a senior developer on a technical approach.
Show answer
Write signup and login handlers using bcrypt.
Show answer
What is Express.js and why is it widely used?
Show answer
What is the purpose of the util.promisify function?
Show answer
What is a callback and what is callback hell?
Show answer
What is Node.js and why is it used for backend development?
Show answer
Frequently asked questions
What does a Node.js Developer do?
Builds and maintains server-side applications and REST APIs using Node.js and Express. Works with product and frontend teams to implement features, integrates databases and third-party services such as payment gateways and SMS providers, writes tests and fixes production bugs. Freshers usually start with CRUD APIs and gradually own complete modules.
Which skills are tested in a Node.js Developer interview?
Expect questions on JavaScript ES6+, Express routing, Async/await, MongoDB basics, Git. Most rounds also ask you to explain a project and solve one practical problem live.
How do I prepare for a Node.js Developer interview?
Revise Node.js Core and Event Loop, Asynchronous JavaScript, Express.js Framework first using the topic sheets, practise the questions on this page aloud, then do one full mock interview to practise timing.