# Express.js

> A small, plain web framework. It helps you build a server with Node.js.

**Field:** Software Development  
**Category:** Web Development  
**Also known as:** Express, ExpressJS

## Think of it like

Think of it like a plain, sturdy table. It does one job well, and you add the rest yourself.

## Definition

Express is a small, simple web framework for Node.js. It lets you set up routes, read requests and send responses in a few lines. It does little on its own, so you add pieces called middleware for things like logins or reading forms. It was first released in 2010 and is one of the most used server tools in JavaScript. Many other Node.js frameworks are built on its ideas.

## Example

Lucy builds a tiny API for her shop with Express. Ten lines of code answer requests on port 3000.

## Example code

```javascript
const express = require("express");
const app = express();
app.get("/", (req, res) => res.send("Hi Emma"));
app.listen(3000);
```

A whole web server that says Hi Emma at the home address.

## Why it matters

Lots of coders start their server work with Express. It is small and easy to read.

## Common mistake

Forgetting to catch errors in async routes. One unhandled error can crash the whole server.

## Three principles

- **Small.** Routes, requests, responses.
- **Add middleware.** Plug in what you need.
- **Runs on Node.js.** JavaScript on the server.

## Related terms

- [Node.js](https://learn.benibix.com/term/development/nodejs)
- [Web Routing](https://learn.benibix.com/term/development/routing)
- [Back End](https://learn.benibix.com/term/development/back-end)
- [Django](https://learn.benibix.com/term/development/django)
- [Middleware](https://learn.benibix.com/term/development/middleware)

## Told apart from

- [Node.js vs Express](https://learn.benibix.com/compare/nodejs-vs-express): People think Node.js is a framework like Express, and it is not. Node.js is the program that runs JavaScript outside the browser. Express is a small framework that runs on Node.js and adds routes and middleware. You need Node.js to use Express, but not the other way round.

---

Source: https://learn.benibix.com/term/development/express
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-19
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
