Skip to content

JonasNicoletti/nestjs-backend

Repository files navigation

Description

Bacis backend gateway to experiment with nestjs.

Features

  • Swagger -> /api
  • JWT access and refresh token in cookies
  • rest-api
  • postgresql with typeorm
  • reset password

Installation

$ npm install

Running the app

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

Deploy on Heroku

# 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

Sources

License

Nest is MIT licensed.

About

Demo Nestjs backend app for try out stuff

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published