Application template for NestJS + Docker + Prisma + MySQL
# install
$ yarn
# Setup env file for database
$ cp prisma/.env.example prisma/.env
# run containers
$ yarn dev
# setup database ( sync database schema )
$ docker exec -it app yarn db:apply
# insert seed data
$ docker exec -it app yarn db:seed
Currently HMR is not enabled, so the server will reload on every file change.
You can view / edit DB tables using Prisma Studio.
Once you run yarn dev
, you can open it in http://localhost:5555
.
Log in to the app
container and run
$ docker exec -it app yarn db:migrate:dev
Swagger UI is available on http://localhost:3000/api
# unit tests
$ docker exec -it app yarn test
# e2e tests
$ docker exec -it app yarn test:e2e
# test coverage
$ docker exec -it app yarn test:cov