Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tkosminov/nestjs-example
NestJS example with using GraphQL (schema stitching, schema reload, dataloader, upload files, subscriptions, response cache), RabbitMQ, Redis, Websocket, JWT authentication, ESLint 9
https://github.com/tkosminov/nestjs-example
amqp dataloader graphql graphql-yoga jwt-authentication nestjs redis schema-reload schema-stitching socket-io typeorm
Last synced: 1 day ago
JSON representation
NestJS example with using GraphQL (schema stitching, schema reload, dataloader, upload files, subscriptions, response cache), RabbitMQ, Redis, Websocket, JWT authentication, ESLint 9
- Host: GitHub
- URL: https://github.com/tkosminov/nestjs-example
- Owner: tkosminov
- License: mit
- Created: 2019-03-17T13:34:06.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2024-12-17T12:58:34.000Z (about 1 month ago)
- Last Synced: 2024-12-28T01:39:02.642Z (25 days ago)
- Topics: amqp, dataloader, graphql, graphql-yoga, jwt-authentication, nestjs, redis, schema-reload, schema-stitching, socket-io, typeorm
- Language: TypeScript
- Homepage:
- Size: 1.41 MB
- Stars: 357
- Watchers: 7
- Forks: 65
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# 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
* [NodeJS 22](https://nodejs.org/download/release/latest-v22.x/)
* [Redis 7](https://redis.io/download/)
* [PostgreSQL 13+](https://www.postgresql.org/download/)
* [RabbitMQ](https://www.rabbitmq.com/download.html)## Run locally
### Installation
```bash
npm ci
```### Run
```bash
npm run start:dev
```### REPL
```bash
npm run repl:dev
```## Run with Docker on host
### Build
```bash
sudo docker build -t nestjs-example . --build-arg env=development
```### Run
```bash
sudo docker run -d --network host nestjs-example:latest
```### Get CONTAINER_ID
```bash
sudo docker ps -a | grep nestjs-example
```### Open container
```bash
sudo docker exec -it $CONTAINER_ID sh
```### Show logs
```bash
sudo docker logs $CONTAINER_ID
```### Stop container
```bash
sudo docker stop $CONTAINER_ID
```### Remove container
```bash
sudo docker rm $CONTAINER_ID
```## Run with Docker Compose
### Create network
```bash
sudo docker network create nestjs-example-network
```### Run
```bash
sudo docker compose up --build
```## Dependencies graph
### Full
```bash
npm run madge:full
```### Circular
```bash
npm run madge:circular
```## Typeorm
### Creating a migration file from modified entities
```bash
npm run typeorm:generate
```### Create an empty migration file
```bash
npm run typeorm:create
```### Run migrations
#### Development
```bash
npm run typeorm:run:dev
```#### Build
```bash
npm run typeorm:run:build
```