4x API Reference

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

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

Note

Express 4.x requires Node.js 0.10.0 or higher.

With express v4.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: