Skip to content

vkondratiuk482/nest-websockets-chat-boilerplate

Repository files navigation

Nest Logo

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

Websockets chat

I decided to get familiar with websockets in Nest.js, realtime chat is the first thing that came to my mind

Features

  • PassportJS/JWT auth
  • Rooms
  • Kick/Ban user

Installation

$ yarn install

Example of .env file

JWT_ACCESS_SECRET=ACCESS_SECRET
JWT_REFRESH_SECRET=REFRESH_SECRET
JWT_ACCESS_EXPIRE=60m
JWT_REFRESH_EXPIRE=30d
DB_NAME=postgres
DB_HOST=localhost
DB_PORT=5432
DB_USERNAME=postgres
DB_PASS=pass123

Running the app

# start docker containers
$ docker-compose up

# development
$ yarn run start