Boilerplate code for a Rest API, implemented with Prisma and NestJS.
To do authentication, you need to have an auth0 account.
Steps
- Create an Auth0 account
- Create an M2M application with all permissions
- Set M2M application credentials
$ export AUTH0_DOMAIN=<domain>
$ export AUTH0_CLIENT_ID=<client_id>
$ export AUTH0_CLIENT_SECRET=<client_secret>
$ ./auth0-setup.sh
$ npm install
# starting the DB
$ docker-compose up --build db
# migrating the DB
$ npm run prisma:migrate
# watch mode
$ npm run start:dev
# production mode
$ npm run start:prod
docker compose --env-file /dev/null up --build
# unit tests
$ npm run test
# e2e tests
$ npm run test:e2e
# test coverage
$ npm run test:cov