Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/vkondratiuk482/nest-websockets-chat-boilerplate
- Owner: vkondratiuk482
- License: mit
- Created: 2021-12-23T15:41:47.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2023-07-02T09:15:05.000Z (over 1 year ago)
- Last Synced: 2024-05-18T17:46:45.781Z (7 months ago)
- Topics: chat-application, javascript, jwt, nest, nodejs, postgresql, typeorm, typescript, websockets
- Language: TypeScript
- Homepage:
- Size: 469 KB
- Stars: 79
- Watchers: 1
- Forks: 9
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-nestjs - NestJS Realtime Chat - Boilerplate for a realtime chat based on Websockets, TypeORM, PostgreSQL, REST, Docker which includes PassportJS/JWT auth, rooms, kick/ban user functionality (Resources)
README
[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
```