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

https://github.com/yashksaini-coder/relay-chat-backend


https://github.com/yashksaini-coder/relay-chat-backend

Last synced: 4 months ago
JSON representation

Awesome Lists containing this project

README

        

# WebSocket Chat Application

A simple WebSocket-based chat application where users can create, join, and chat in rooms.

## ๐Ÿ“ฆ Prerequisites

| ![TypeScript](https://skillicons.dev/icons?i=typescript) | ![Node.js](https://skillicons.dev/icons?i=nodejs) | ![Git](https://skillicons.dev/icons?i=git) |
|-----------------|---------|------|

## โœจ Features
- Create a room ID with a unique 6-character code. ๐Ÿ”‘
- Join existing chat rooms. ๐Ÿšช
- List active rooms with the number of users. ๐Ÿ“‹
- Real-time chat functionality (message polling). ๐Ÿ’ฌ

## ๐Ÿ“ Project Structure

```
.
โ”œโ”€โ”€ .gitignore
โ”œโ”€โ”€ dist/
โ”‚ โ””โ”€โ”€ index.js
โ”œโ”€โ”€ node_modules/
โ”œโ”€โ”€ package-lock.json
โ”œโ”€โ”€ package.json
โ”œโ”€โ”€ README.md
โ”œโ”€โ”€ src/
โ”‚ โ””โ”€โ”€ index.ts
โ”œโ”€โ”€ tsconfig.json
โ””โ”€โ”€ tsconfig.tsbuildinfo
```

## ๐Ÿ› ๏ธ Setup Instructions

1. Clone the repository:
```bash
git clone https://github.com/yashksaini-coder/relay-chat-backend
cd relay-chat-backend
```

2. Install dependencies:
```bash
npm install
```

3. Start the server:
```bash
npm run dev
```

### ๐Ÿงช Testing:

To test the updated functionality, you can use a Postman and use the Websocket server instance. These are the messages to check the functionality:

![Postman Testing](./assets/img/testing.png)