Skip to content
Devgo

Express

The most popular minimal web framework for Node.js. Express handles routing, middleware, and HTTP requests/responses. Simple, unopinionated, and the basis for many other frameworks. The default choice for Node.js APIs for years, now often replaced by Fastify or Next.js API routes.

Created by

TJ Holowaychuk · Created Express.js in 2010

When to use
  • Simple Node.js APIs.
  • Learning backend concepts.
  • Legacy Node.js codebases.
When not to
  • New high-performance APIs (use Fastify).
  • Full-stack apps (use Next.js API routes).
  • TypeScript-heavy projects (Fastify has better TS support).

Definition

Express is a minimal, flexible web framework. It provides routing (app.get/post), middleware (functions that run on each request), and request/response handling. Unopinionated — you choose your own , auth, structure. The standard for Node.js servers for a decade.

Why it exists

Raw is verbose. Express adds routing, middleware, and helpers with minimal overhead, letting you build APIs and web apps quickly.

How it works

Create an app, define routes (app.get('/users', handler)), add middleware (app.use(bodyParser)). Each request passes through middleware chain to the route handler. Handlers receive req/res and call res.send/json. Listen on a port.

Scaling limits

Callback-based (older style, though promises work). No built-in validation/schema (add Zod/Joi). Single-threaded ( limitation). Slower than Fastify. No built-in types (need @types/express).

Cost shape

Free and open source.

Alternatives

  • Fastify — Faster, better , schema validation built-in.
  • Next.js API routes — Colocated with frontend, but less flexible.

Failure modes

  • Unhandled promise rejections crashing the server.
  • Missing error middleware.
  • Callback-style code (use async/await).

, ,