Open navigation menu

Express

Fast, unopinionated, minimalist web framework for Node.js with robust routing and middleware ecosystem.

Version: v4.19

Official Documentation ↗

Installation

npmnpm install express
pnpmpnpm add express
yarnyarn add express

Methods

FAQ

Should I use Express or Fastify for new projects?
Express has the largest ecosystem and middleware library. Fastify offers better performance (2-3x faster), built-in schema validation, and async support. Choose Express for ecosystem compatibility, Fastify for performance.
How do I handle async errors in Express?
Express 4 does not catch async errors automatically. Wrap handlers in try/catch and call next(err), or use express-async-errors package. Express 5 (beta) catches async errors natively.
What is Express 5 status?
Express 5 is in beta with breaking changes: async error support, path matching changes, and removed deprecated APIs. It is not recommended for production yet. Use Express 4.19+ for stable releases.