Skip to content

Nirrleybo/nestjs

Repository files navigation

Nest Logo

A progressive Node.js framework for building efficient and scalable server-side applications.

Description

Nest framework TypeScript starter repository.

Installation

npm install

Running the app

# Spin local DB
# PGAdmin: host.docker.internal
docker-compose up -d

# development
npm run start

# watch mode
npm run start:dev

# production mode
npm run start:prod

Test

# unit tests
npm run test

# e2e tests
npm run test:e2e

# test coverage
npm run test:cov

Debug

Debug

Deploy

The app will be deployed to Heroku.

Creating Postgres DB in Heroku

Before we can deploy the app, we need to create a Postgress db in Heroku and to set the db credencials in a config file.

  1. doc
  2. App Postgress dashboard and also in here
  3. After creating the db, find the db credencials in the db dashboard page
  4. To set the environmetn variables, go to the app dashboard's settings page. Scroll down to Config Vars and click on Reveal Config Vars.
  5. Fill in the Postgress, JWT and other vars.

Usfull deployment comands

# Do only once
heroku login

# Do only once
heroku git:remote -a mynestjs

# Deploy
git push heroku master

# Watch app logs
heroku logs --tail

Ref

Nestjs tutorial

TODO

  1. [Done] sign in user after registring