# Built-in Middleware — Express.js

Source: https://www.geekswithgeeks.com/en/expressjs/ex-builtin-middleware

> Express ships JSON parsing and static-file serving out of the box.

## No extra install needed

Since Express 4.16, common needs — body parsing, static files, URL-encoded forms — ship built in under the `express` namespace.

## express.json() & express.urlencoded()

Parse JSON bodies and HTML form submissions respectively.

```javascript
app.use(express.json());
app.use(express.urlencoded({ extended: true }));
```

## express.static()

Serves files from a folder directly — images, CSS, a built frontend. Covered in depth later.

```javascript
app.use(express.static('public'));
```
