How to run it in 60 minutes
- 0–5 minIntroductions, the role and how the interview will run
- 5–15 minBackground and core Node.js (sections 1–2)
- 15–40 minCoding exercise with follow-ups (section 10)
- 40–52 minAPI development and security (sections 4 and 8), or performance (7) for high-traffic roles
- 52–60 minCandidate's questions (section 13); write up your scores right after
The questions
01General background
- Can you describe your experience with Node.js? How long have you been working with it?
- What types of projects have you built using Node.js?
- When would you choose Node.js over other backend technologies, and when wouldn't you?
- Which recent Node.js features have you used (e.g. the built-in test runner, fetch, ES modules)?
What to listen for
Production services they built and ran, at what scale, and an honest view of where Node.js isn't the right tool (CPU-heavy work).
02Core Node.js knowledge
- What are the key features of Node.js, and why is it suitable for server-side development?
- Can you explain the event loop in Node.js?
- How does Node.js handle asynchronous operations?
- What are the differences between setImmediate and process.nextTick?
What to listen for
Non-blocking I/O on a single thread, with libuv's thread pool handling file system, DNS and crypto work. process.nextTick runs before promise callbacks and before the event loop moves on; setImmediate runs in the check phase after I/O. CPU-heavy work blocks everything, so it goes to worker threads or another service.
03JavaScript fundamentals
- What is the difference between let, const, and var in JavaScript?
- Can you explain closures and how they are used in Node.js?
- What are promises, and how do they differ from callbacks?
- How would you handle errors in asynchronous code?
What to listen for
Closures with a practical example. Promises and async/await vs callbacks. Errors in async code: await inside try/catch, no unhandled rejections, no swallowed errors.
04API development
- Can you describe how you would build a RESTful API using Node.js?
- What are some best practices for structuring and securing APIs in Node.js?
- How do you handle authentication in a Node.js API (e.g., JWT, OAuth)?
- What are HTTP status codes, and how do you use them in your APIs?
What to listen for
Resource-oriented routes, input validation (e.g. zod), short-lived tokens or sessions, rate limiting, and status codes used precisely: 400 vs 401 vs 403 vs 404 vs 409.
05Frameworks and libraries
- What is your experience with frameworks like Express.js or Koa.js?
- How do you decide which middleware to use in an Express.js application?
- Can you explain the difference between middleware and routes in Express.js?
- Have you worked with libraries like Sequelize or Mongoose for database interactions?
What to listen for
Middleware order matters, and Express error handlers take four arguments. Framework choice (Express, Fastify, NestJS) explained by trade-offs.
06Database and data management
- What databases have you worked with in Node.js (e.g., MongoDB, PostgreSQL, MySQL)?
- How do you handle database connections in a Node.js application?
- Can you explain how to perform CRUD operations using Node.js?
- What are the advantages of using an ORM/ODM with Node.js?
What to listen for
Connection pooling, parameterized queries, migrations, and when an ORM helps vs when plain SQL is clearer.
07Performance and scalability
- How do you handle performance bottlenecks in Node.js applications?
- Can you explain how clustering works in Node.js?
- What are some strategies for scaling a Node.js application?
- How do you use caching (e.g., Redis) to improve application performance?
What to listen for
Profile before optimizing (--cpu-prof, flame graphs, event loop lag). Scale with several processes behind a load balancer (cluster or containers), cache with Redis using TTLs and a clear invalidation plan.
08Security
- What are the common security risks in Node.js applications?
- How do you prevent SQL injection and XSS attacks in your code?
- Can you explain how to secure sensitive data (e.g., environment variables)?
- What tools or libraries do you use for securing APIs?
What to listen for
OWASP basics: injection prevented with parameterized queries, XSS with output encoding, secrets in a secret manager rather than committed files, lockfiles and npm audit, security headers and rate limiting.
09Testing and debugging
- What is your experience with testing tools like the built-in node:test, Jest, Vitest or Mocha?
- How do you write and run unit tests for your Node.js application?
- Can you explain how to debug a Node.js application?
- What tools do you use for monitoring and logging in production?
What to listen for
Tests at the right level (node:test, Jest or Vitest, supertest for HTTP), mocks only at boundaries, debugging with --inspect, structured logs and tracing in production.
10Problem-solving exercise
Give one practical problem and let the candidate talk through it while they code.
Coding challenge (pick one)
- Write a simple Node.js API to handle CRUD operations for a “tasks” resource.
- Implement a function to fetch data from an external API and log the response asynchronously.
- Write middleware to log the request method and URL for each incoming request.
Follow-up questions
- How would you optimize your solution?
- How would you test your implementation?
What to listen for
async/await with proper error handling, input validation, correct status codes and small, testable functions.
11DevOps and deployment
- What is your experience with deploying Node.js applications?
- Can you explain how to use process managers like PM2?
- How do you handle environment-specific configurations in Node.js?
- Have you worked with containerization tools like Docker for Node.js apps?
What to listen for
Process restarts handled by the platform (systemd, Kubernetes, Cloud Run) or PM2, graceful shutdown on SIGTERM, configuration from the environment, npm ci and small container images.
12Collaboration and code management
- How do you manage dependencies in a Node.js project?
- What is your experience with version control systems like Git?
- How do you ensure your code is maintainable and readable for others?
- Have you contributed to open-source Node.js projects?
What to listen for
Lockfiles, semantic versioning, regular dependency updates and audits, readable code reviewed by peers.
13Closing questions
- What Node.js features or libraries are you currently exploring?
- How do you stay updated on the latest trends and best practices in Node.js?
- Do you have any questions for us about the role or the team?
What to listen for
Interest in where the runtime is going and their own questions about the team's stack.
Scorecard
Rate each competency from 1 to 4 straight after the interview, before you compare notes with other interviewers, and write down the evidence behind every score.
| Competency | What to assess | Score |
|---|---|---|
| Node.js runtime | event loop, async I/O, blocking | 1–4 |
| JavaScript | closures, promises, error handling | 1–4 |
| APIs | design, validation, auth, status codes | 1–4 |
| Data | databases, pooling, queries, migrations | 1–4 |
| Performance and scaling | profiling, caching, multiple processes | 1–4 |
| Security | injection, XSS, secrets, dependencies | 1–4 |
| Problem solving | coding exercise: approach, correctness, edge cases | 1–4 |
| Collaboration | readability, code review, communication | 1–4 |
- 1 · No evidence
- Couldn't answer, or the answer was wrong.
- 2 · Partial
- Knows the concept, but couldn't apply it or needed heavy prompting.
- 3 · Solid
- Correct and applied it to a real example, with minor gaps.
- 4 · Strong
- Clear, correct, discussed trade-offs and went beyond the question.
Run this interview in FlowHero
This template is built into FlowHero. Start an interview from it, take notes under each question while you talk, and get an AI summary of your notes to review before the debrief. Start free. No credit card required.

Questions about this template
Should candidates use JavaScript or TypeScript?
Whichever they're most productive in. If your team uses TypeScript, ask how they type API inputs and outputs and where they'd validate at runtime.
How deep should event loop questions go?
For mid-level candidates: blocking vs non-blocking code and microtasks vs tasks. For senior candidates: loop phases, libuv's thread pool, and how they diagnosed event loop lag in production.
Is this template Express-specific?
No. Express appears in a few questions because it's the most common framework; Fastify, Koa or NestJS answers are equally valid.