Node & Express ⚡ Recently updatedUpdated on Jun 30, 2026 — this content may still be evolving.
Node.js & Express: Mock Interview (45 Minutes)
Section 1: Warm-up (5 min)
- “Describe your backend project.”
- “Why Node.js for this project?”
- “What database did you use and why?”
Section 2: Node & Express Basics (10 min)
- “What is Node.js?”
- “What is middleware in Express?”
- “Difference between
req.params,req.query,req.body?” - “How does the middleware chain work?”
Section 3: API Design (8 min)
- “Design REST routes for a todo resource.”
- “Which status code for: created, not found, validation error, unauthorized?”
- “How implement pagination?”
Section 4: Live Coding (12 min)
Pick ONE:
Option A: Auth middleware
“Write middleware that checks JWT in Authorization header.”
Option B: CRUD route
“Write POST /api/posts that validates title and creates a post.”
Option C: Error handler
“Write centralized error handling middleware.”
Section 5: Auth & Security (7 min)
- “How store passwords?”
- “JWT vs sessions?”
- “What is CORS?”
- “How prevent brute force login?”
Section 6: Project (3 min)
- “Walk through your auth flow end-to-end.”
- “One security improvement you’d add.”
Rubric
| Area | 1 | 3 | 5 |
|---|---|---|---|
| REST design | Verbs in URLs | Correct routes | Pagination, consistent JSON |
| Auth | Plain passwords | JWT basics | bcrypt, middleware, roles |
| Errors | No handling | try/catch | Centralized, correct codes |
| Security | No awareness | CORS + validation | Helmet, rate limit, httpOnly |
Homework: Implement one route from api-design.md from scratch in 15 minutes.