NestJS with PostgreSQL, TypeORM, JWT auth, and Docker

Teguh Arief

May 28, 2024

Share article to

NestJS with PostgreSQL, TypeORM, JWT auth, and Docker.

These are the steps to run NestJS with PostgreSQL, TypeORM, JWT auth, and Docker, then Git through Darwin Terminal.

In addition for dependencies, also includes commands used by NestJS, Docker, and Git.


brew install node



npx @nestjs/cli new nestjs-postgresql-typeorm-jwt-auth



cd nestjs-postgresql-typeorm-jwt-auth


NestJS, PostgreSQL, TypeORM, and JWT auth




npm install pg @nestjs/typeorm @nestjs/jwt @nestjs/config class-transformer class-validator



npx @nestjs/cli g resource users



npx @nestjs/cli g resource auth



npm install


Docker




touch Dockerfile .dockerignore docker-compose.yml



docker compose build



docker compose up


Git




git init



git add .



git commit -m “first commit”



git branch -M main



git remote add origin git@github.com:teguharifudin/fabrotech.git



git remote set-url origin https://github.com/teguharifudin/fabrotech.git



git push origin -u main


This project NestJS with PostgreSQL, TypeORM, and JWT auth, and Docker can be checked out at https://github.com/teguharifudin/fabrotech, then give me coffee.

Related Posts