Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/vkondratiuk482/nest-websockets-chat-boilerplate

Realtime chat with rooms using Nest + Websockets
https://github.com/vkondratiuk482/nest-websockets-chat-boilerplate

chat-application javascript jwt nest nodejs postgresql typeorm typescript websockets

Last synced: 5 days ago
JSON representation

Realtime chat with rooms using Nest + Websockets

Awesome Lists containing this project

README

        


Nest Logo

[circleci-image]: https://img.shields.io/circleci/build/github/nestjs/nest/master?token=abc123def456
[circleci-url]: https://circleci.com/gh/nestjs/nest

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](https://github.com/nestjs/nest), realtime chat is the first thing that came to my mind

## Features

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

## Installation

```bash
$ yarn install
```

## Example of .env file
```bash
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

```bash
# start docker containers
$ docker-compose up

# development
$ yarn run start
```