This project was created for users to share their favorite youtube songs!
- npm
- Clone the backend in a folder
https://github.com/GuilhermeArrudda/sing-me-a-song-api.git
- Install the dependencies executing command
npm i
- Create a .env file on the backend that matches the database, for example:
DATABASE_URL=postgres://USER:USER_PASSWORD@localhost:5432/DATABASE_NAME
- Create a .env.tests file on the backend that matches the tests database and tests ambient, for example:
DATABASE_URL=postgres://USER:USER_PASSWORD@localhost:5432/DATABASE_NAME_TESTS
NODE_ENV=test
- Create database with prisma
npx prisma init
npx prisma migrate dev
- Start backend
npm run dev
- Tests backend
npm run test