5x API Reference

This section provides an overview of the modules and APIs available in Express 5.x for building web applications and HTTP services.

index.js
const express = require('express');
const app = express();
app.get('/', (req, res) => {
res.send('hello world');
});
app.listen(3000);

Note

Express 5.x requires Node.js 18 or higher.

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: