https://github.com/legoffmael/nodejsmusicapi
Training project about API in NodeJs
https://github.com/legoffmael/nodejsmusicapi
Last synced: 3 months ago
JSON representation
Training project about API in NodeJs
- Host: GitHub
- URL: https://github.com/legoffmael/nodejsmusicapi
- Owner: LeGoffMael
- Created: 2019-05-03T17:33:26.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-05-18T18:13:47.000Z (about 6 years ago)
- Last Synced: 2025-03-25T11:03:00.403Z (3 months ago)
- Language: JavaScript
- Homepage:
- Size: 130 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[](https://travis-ci.org/LeGoffMael/NodeJsMusicApi)
# NodeJsMusicApi
NodeJs Music API is a training project using Babel, Chai, Express, MongoDB & Mocha.## TODO
- Display `self` and `related` virtual attributes
- Improve unit tests of albums part (delete an artist should delete his albums, test endpoints from artist, ...)
- Implement query strings (limit, offset, sort, ...)## To start
- Dependencies installation : `npm install`
- Launch unit tests : `npm test`
- App MusicApi : `npm start`## Home
- Link to home page: `/`
- Link to API home page: `/api/v1/`
Starting web PORT value can be change with an environment variable (8080 by default).## API endpoints
| HTTP REQUESTS | URL | Status |
| --- | --- | :---: |
| **Artist** |
| GET/POST | /artists | OK |
| GET/PUT/PATCH/DELETE | /artists/:artist_id | OK |
| GET/POST | /artists/:artist_id/albums | OK |
| GET/PUT/PATCH/DELETE | /artists/:artist_id/albums/:album_id | OK |
||
| **Album** |
| GET/POST | /albums | OK |
| GET | /albums/:album_id | OK |## Database schema
| Artist | Album |
| --- | --- |
| id | id |
| name | title |
| firstName | year |
| lastName | cover |
| createdAt | Artist |
| updatedAt | createdAt |
| | updatedAt |