--- tags: music-library,solution,track --- # Music Library ArtistRouter and ArtistController ```javascript= // src/controllers/artist.js const createArtist = (req, res) => { res.sendStatus(201); } module.exports = { createArtist } ``` ```javascript= // src/routes/artist.js const express = require('express'); const artistController = require('../controllers/artist'); const router = express.Router(); router.post('/', artistController.createArtist); module.exports = router; ``` ```javascript= // src/app.js const express = require('express'); const artistRouter = require('./routes/artist'); const app = express(); app.use(express.json()); app.use('/artists', artistRouter); module.exports = app; ```
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up