A simple CRUD application for music platform
Has three database entities:
- Band
- Album
- Track
$ npm install
Application connects to the postgres instance, you have to have one.
In my case it is running in docker, so there is a dedicated script to run it.
$ npm run start:dev:db
You need to add variables to the .env file for it to work:
- POSTGRES_HOST
- POSTGRES_PORT
- POSTGRES_USER
- POSTGRES_PASSWORD
- POSTGRES_DATABASE
- JWT_ACCESS_SECRET
- JWT_REFRESH_SECRET
- SMTP_HOST
- SMTP_PORT
- SMTP_USER
- SMTP_PASSWORD
- APP_LINK - this app url
- CLIENT_URL - your client url (to redirect after email confirmation)
Now you can run database migrations to create tables
$ npm run typeorm -- migration:run
# development
$ npm run start:dev
# build
$ npm run build
# production mode
$ npm run start:prod
# unit tests
$ npm run test
# e2e tests
$ npm run test:e2e
# test coverage
$ npm run test:cov