5.x API Reference
This section provides an overview of the modules and APIs available in Express 5.x for building web applications and HTTP services.
js
const express = require('express');
const app = express();
app.get('/', (req, res) => {
res.send('hello world');
});
app.listen(3000);js
import express from 'express';
const app = express();
app.get('/', (req, res) => {
res.send('hello world');
});
app.listen(3000);ts
import express, { type Express, type Request, type Response } from 'express';
const app: Express = express();
app.get('/', (req: Request, res: Response) => {
res.send('hello world');
});
app.listen(3000);INFO
Express 5.x requires Node.js 18 or higher. This fork supports Node.js 22, 24 and 26 only.
With express v5.x, you can define routes, configure middleware, and start handling HTTP requests using the application instance created by the express() function. The API is organized into the following sections:
- express(): the
express()function, which creates an Express application. - Application object: the properties and methods of the Express 5.x application object.
- Request object: the properties and methods of the Express 5.x request object.
- Response object: the properties and methods of the Express 5.x response object.
- Router: the properties and methods of the Express 5.x router.