Skip to content

akuchmiy/muzikus-server

Repository files navigation

Powered by
Nest Logo

Description

A simple CRUD application for music platform
Has three database entities:

  • Band
  • Album
  • Track

Installation

$ 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

Variables

You need to add variables to the .env file for it to work:

Database

  • POSTGRES_HOST
  • POSTGRES_PORT
  • POSTGRES_USER
  • POSTGRES_PASSWORD
  • POSTGRES_DATABASE

User authentication

  • JWT_ACCESS_SECRET
  • JWT_REFRESH_SECRET

Email sender

  • SMTP_HOST
  • SMTP_PORT
  • SMTP_USER
  • SMTP_PASSWORD

Other

  • 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

Running the app

# development
$ npm run start:dev

# build
$ npm run build

# production mode
$ npm run start:prod

Test

# unit tests
$ npm run test

# e2e tests
$ npm run test:e2e

# test coverage
$ npm run test:cov

About

A simple CRUD application for music platform

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published