Express

Express.js is a minimal web framework for Node.js. It handles routing (mapping URLs to handler functions), middleware (functions that run on every request), and sending responses. It works with any frontend: React, Vue, or plain HTML.

Express is one of the most widely used Node.js frameworks. It does not impose a fixed project structure, so you can organise your code however makes sense for your project.

Express 5

Express 5 was released in 2024. All examples in this guide work on Express 5. The main change from Express 4 is that async route handlers now propagate thrown errors automatically, so you no longer need to wrap every async handler in a try/catch and call next(err) manually.

Install Express with:

npm install express

What to know first

Before starting with Express, you should be comfortable with:

Pages in this section