Bacis backend gateway to experiment with nestjs.
- Swagger -> /api
- JWT access and refresh token in cookies
- rest-api
- postgresql with typeorm
- reset password
$ npm install
declare .env
and docker.env
files with following enviroment variables:
-
NESTJS
DATABASE_URL
PORT
JWT_ACCESS_TOKEN_SECRET
*JWT_ACCESS_TOKEN_EXPIRATION_TIME
*JWT_REFRESH_TOKEN_SECRET
*JWT_REFRESH_TOKEN_EXPIRATION_TIME
*NODE_ENV
*EMAIL_SERVICE
*EMAIL_USER
*EMAIL_PASSWORD
*RESET_PWD_TOKEN_SECRET
*RESET_PWD_TOKEN_EXPIRATION_TIME
*
-
DOCKER
POSTGRES_USER
POSTGRES_PASSWORD
POSTGRES_DB
PGADMIN_DEFAULT_EMAIL
PGADMIN_DEFAULT_PASSWORD
# run postgres in container
$ sudo docker-compose up
# development
$ yarn start
# watch mode
$ yarn start:dev
# production mode
$ yarn start:prod
# add heroku remote if not added yet
$ heroku git:remote -a <APP_NAME>
# add enviroment variables(all the variable for NESTJS marked with '*')
$ heroku config:set <VARIABLE>=<VALUE> -a <APP_NAME>
# push and deploy
$ git push heroku master
Nest is MIT licensed.