---
# System prepended metadata

title: Untitled

---

If you don't understand how the below works, don't move on!

`src/app.js`

```js
...
const artistControllers = require('./controllers/artists');

...

app.post('/artists', artistControllers.create);

...
```

`src/controllers/artists.js`

```js
exports.create = (req, res) => {
  res.sendStatus(201);
};
```

---

:exclamation: 

Note that in this example we've created an `src/controllers/` folder and moved our controller out to an `artists.js` file to stop our `app.js` file from getting too heavy as we add more endpoints.

---