API for Sing me a Song, a application for videos recommendations. The recommendation is given based on their score.
- Add a new music recommendation
- Like or dislike (up or down vote)
- Get a list of the videos with the hightest scores
- Get a random video recommendation
- Clone this repository
git clone git@github.com:acolima/sing-me-a-song-api.git
- Go to the project directory
cd sing-me-a-song-api
- Install dependencies
npm i
- Create a
.env
file with the same structure of.env.example
and change the value ofDATABASE_URL
DATABASE_URL=
- Create the database
npx prisma migrate dev
- Run project with
npm run dev
⭐ You can check the front-end repository of this project here and follow the instructions to run
- Create a
.env.test
file with the same structure of.env.example
and change the value ofDATABASE_URL
DATABASE_URL=
- Create the tests database
npx dotenv -e .env.test prisma migrate dev
- Run project with
npm run dev:test
- Run tests
npm run test
- Run coverage tests
npm run test:coverage