Source: https://seerepo.com/docs/express
Markdown source: https://seerepo.com/docs/express.md
Description: What SeeRepo reads in an Express API: its routes, its server and its webhooks.

# SeeRepo with Express

SeeRepo recognizes an Express app from the `express` package in its `package.json`.

## What SeeRepo reads

- Every route is an **action**: `app.get('/…')`, `router.post('/…')`, `.put`, `.patch`, `.delete` and `.all`, and chained routes like `.route('/x').get()`.
- The file that creates the server (`express()`) or starts it (`.listen(port)`) is a **door**.
- Routes that receive webhooks are **API** doors, for **Machines**.
- Mongoose models in the same repo are **data**: see [Mongoose](/docs/mongoose).

## An example from our test bank

`hagopj13/node-express-boilerplate`, read at a fixed commit:

- 3 actions and 34 inner pieces, in 39 product files
- 2 data models with Mongoose: Token and User
- MongoDB, found as a service with its proof

## Good to know

- Express often lives next to a frontend in the same repo. In a monorepo, each package is read with its own framework: in our bank, `async-labs/saas` has Next.js apps and Express APIs side by side, and SeeRepo reads 7 Mongoose models from it (Discussion, EmailTemplate, Invitation, PasswordlessToken, Post, Team, User).
- Other JavaScript server frameworks (Nest, Hono, Fastify) aren't recognized yet: their files still appear on the map.
