intermediate

Express

Minimal Node HTTP framework knowledge: routing, middleware order, error flow, validation, security middleware, and Supertest.

Express interviews focus on minimal HTTP framework mechanics: routing trees, middleware order, error middleware, validation, security middleware, and Supertest-based testing.

Subtopics: routing, middleware, error middleware, validation, security middleware, and Supertest testing.

On interviews: explain first-match routing, where auth and body parsing run, how four-argument error handlers work, and why handlers should stay thin.

Common pitfalls: overlapping routes, async handlers without error forwarding, missing centralized error middleware, and security headers bolted on inconsistently.

The trade-off is balancing simplicity, performance, safety, and operability — name which axis you optimized and what cost you accepted.

Checklist:

  • Mount routers by resource with clear prefixes.
  • Order parsing, auth, validation, then handlers.
  • Map errors to stable status codes and shapes.
  • Test routes with controlled fixtures and auth state.