Skip to content

Latest commit

 

History

History
130 lines (85 loc) · 1.64 KB

README.md

File metadata and controls

130 lines (85 loc) · 1.64 KB

NestJS-Example

NestJS example with using GraphQL (schema stitching, schema reload, dataloader, upload files, subscriptions, response cache), RabbitMQ, Redis, Websocket, JWT authentication, ESLint 9

Dependencies

Run locally

Installation

npm ci

Run

npm run start:dev

REPL

npm run repl:dev

Run with Docker on host

Build

sudo docker build -t nestjs-example . --build-arg env=development

Run

sudo docker run -d --network host nestjs-example:latest

Get CONTAINER_ID

sudo docker ps -a | grep nestjs-example

Open container

sudo docker exec -it $CONTAINER_ID sh

Show logs

sudo docker logs $CONTAINER_ID

Stop container

sudo docker stop $CONTAINER_ID

Remove container

sudo docker rm $CONTAINER_ID

Run with Docker Compose

Create network

sudo docker network create nestjs-example-network

Run

sudo docker compose up --build

Dependencies graph

Full

npm run madge:full

Circular

npm run madge:circular

Typeorm

Creating a migration file from modified entities

npm run typeorm:generate

Create an empty migration file

npm run typeorm:create

Run migrations

Development

npm run typeorm:run:dev

Build

npm run typeorm:run:build