Express là web framework minimal cho Node.js, cung cấp routing và middleware system mà không áp đặt cấu trúc dự án.
- Phổ biến nhất trong Node.js ecosystem vì: API cực đơn giản (
app.get('/users', handler)), middleware pipeline linh hoạt cho phép compose nhiều concerns (auth, logging, validation) thành chuỗi, và hệ sinh thái packages khổng lồ nhưcors,helmet,multer,passport. - Express cũng là nền tảng để nhiều framework khác xây dựng lên như NestJS.
- Tuy nhiên nhược điểm là quá minimal — không có validation, ORM, hay structure built-in, dev phải tự lắp ghép.
- Với TypeScript projects hiện đại, nhiều team chuyển sang NestJS (opinionated, decorator-based) hoặc Fastify (nhanh hơn 2-3x, schema validation built-in).
Express is a minimal web framework for Node.js that provides routing and a middleware system without imposing a project structure.
- It's the most popular Node.js framework because: its API is extremely simple (
app.get('/users', handler)), its flexible middleware pipeline lets you compose multiple concerns (auth, logging, validation) into a chain, and it has a massive package ecosystem includingcors,helmet,multer, andpassport. - Express also serves as the foundation for other frameworks like NestJS.
- However, its minimalism is also a drawback — no built-in validation, ORM, or structure means developers must assemble everything themselves.
- For modern TypeScript projects, many teams have moved to NestJS (opinionated, decorator-based) or Fastify (2-3x faster, built-in schema validation).