A simple NestJS JWT template for getting started.
$ npm install
$ docker-compose up
$ npm run migration:run
$ cp .env.example .env
Make any necessary changes to the .env
file.
By default, authorization is enabled. However, this can be disabled by changing the following line in the .env
file:
API_AUTH=false
In development mode you can simply run the app in watch mode like this:
$ npm run start:dev
The app is now available via the following link:
http://localhost:3000/api/v1
In production:
$ npm run start:prod
You can access the swagger docs via the following link:
http://localhost:3000/api/v1/docs/
Note that for the authorization you will have to enter the following value:
Bearer <TOKEN>
# unit tests
$ npm run test
# e2e tests
$ npm run test:e2e
# test coverage
$ npm run test:cov
Create a new empty migration:
$ npm run migration:create NameOfMigration
Generate a migration from current schemas:
$ npm run migration:generate NameOfMigration
Run all the migrations:
$ npm run migration:run