npmexpressv5.2.1
npmIntermediate

express

Fast, unopinionated, minimalist web framework

nodeweb-frameworkmiddlewarerest-apihttp-serverexpressframeworksinatrawebhttp
The Problem

Node.js's built-in http module gives you raw access to requests and responses but nothing else β€” no routing, no middleware, no cookie parsing, no static file serving. Every web app needed to solve these problems from scratch. Express defined the Node.js web server model that most frameworks still follow today.

Mental Model

Express is a middleware pipeline. Every incoming request travels through a chain of middleware functions in order. Each middleware calls next() to pass the request forward, sends a response to end the chain, or both. app.get('/users', middleware1, middleware2, handler) is just a named slot in that chain.

60-second start

Install express

npm install express
import { } from 'express';

Use it when

Use Express for REST APIs and web servers in Node.js, especially when you value a minimal core with full control over what you add. It's the most documented Node.js framework with the largest ecosystem of compatible middleware.

Skip it when

Express is synchronous by default and has poor built-in TypeScript support. For TypeScript-first APIs, try Fastify or Hono. For full-stack apps with server-side rendering, use Next.js. For edge/serverless, Hono's smaller footprint is better.

Alternatives
fastify2-3x faster than Express, TypeScript-first, built-in JSON schema validation β€” the modern Express replacement
honoTiny and runs everywhere: Node, Cloudflare Workers, Deno, Bun β€” best for edge deployments
koaFrom the Express team; async-first and more minimal β€” a cleaner version of Express's ideas

Ready to explore the full API?

See every class, function, and relationship in an interactive graph.