mausconi / nestjs-example

NestJS example with GraphQL, Schema-Stitching, Dataloader, GraphQL Upload, RabbitMQ, Redis, Scalable Websocket and JWT authentication

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NestJS

Description

Nest framework TypeScript starter repository.

Support

Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please read more here.

NestJS-Example

Dependencies

Installation

npm i

Running the app

development

npm run start:dev

beta

npm run build
npm run start:beta

prod

npm run build
npm run start:prod

Running the app with docker

docker network create nestjs_example_network

Update config.json:

  "DB_SETTINGS": {
    "host": "db", // service name from docker-compose.yml
    "port": 5432, // service port from docker-compose.yml
    ...
  },
  ...
  "REDIS_SETTINGS": {
    "host": "redis", // service name from docker-compose.yml
    "port": 6379, // service port from docker-compose.yml
    ...
  },

Build and run container

docker-compose -f docker-compose.yml up --build

After creating containers, create a database

docker-compose -f docker-compose.yml exec db sh

createdb nestjs_example_$ENV -U postgres

After restart the containers

docker-compose -f docker-compose.yml up

About

NestJS example with GraphQL, Schema-Stitching, Dataloader, GraphQL Upload, RabbitMQ, Redis, Scalable Websocket and JWT authentication


Languages

Language:TypeScript 92.6%Language:HTML 5.2%Language:Dockerfile 2.1%