## Table of Contents
- [[#Express router]]
- [[#Controllers]]
- [[]]
- [[]]
### `res`, `res`
`req` and `res` are objects containing information about the http request and response, respectively.
From `req` we are able to glean certain information related to the http request, such as the client's IP address, info about the client's browser, etc. (basically, all of the info from [[HTTP#^85025d|the request headers]]).
The `res` object is all of the stuff the server sends back.
Generally speaking (oversimplification), in Express, we *get stuff* out of the `req` object, and *add things* to the `res` object.
### Express router
Express router is a like a mini Express app. It helps with modularization.
### Controllers
Controllers in Express refer to collections of middleware functions typically grouped around a specifc topic
`app.use` means any request can access the passed-in endpoint
```js
// route all requests to `/articles` endpoint to articleRouter file
app.use('/articles', articleRouter)
```
If we pass an argument to `next()`, that goes to the global error handler.
### Middleware
[Middleware functions in Express](https://expressjs.com/en/guide/writing-middleware.html)
___
**Tags**: