https://github.com/kartikmehta8/rs-websocket-chat
A Websocket based chat application using Rust backend, and React frontend.
https://github.com/kartikmehta8/rs-websocket-chat
react rust websocket
Last synced: 3 months ago
JSON representation
A Websocket based chat application using Rust backend, and React frontend.
- Host: GitHub
- URL: https://github.com/kartikmehta8/rs-websocket-chat
- Owner: kartikmehta8
- Created: 2024-12-11T15:03:14.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-12-11T15:03:23.000Z (5 months ago)
- Last Synced: 2025-02-10T05:18:00.123Z (3 months ago)
- Topics: react, rust, websocket
- Language: Rust
- Homepage:
- Size: 177 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Chat Application

This is a simple chat application built using Rust for the backend and React with TailwindCSS for the frontend. It allows users to join chat rooms and exchange messages in real time.
## Folder Structure
```
chat-app/
|-- backend/
| |-- src/
| | |-- main.rs
| |-- Cargo.toml
|-- frontend/
| |-- src/
| | |-- components/
| | | |-- ChatRoom.js
| | | |-- RoomList.js
| | |-- App.js
| | |-- index.css
| | |-- index.js
| |-- package.json
|-- README.md
```## Backend Setup
1. Navigate to the backend directory:
```bash
cd backend
```
2. Install Rust dependencies:
```bash
cargo build
```
3. Run the server:
```bash
cargo run
```The server will start at `ws://127.0.0.1:3030/chat`.
## Frontend Setup
1. Navigate to the frontend directory:
```bash
cd frontend
```
2. Install Node.js dependencies:
```bash
npm install
```
3. Start the development server:
```bash
npm start
```The frontend will be available at `http://localhost:3000`.
## How to Use
1. Start the backend server.
2. Start the frontend server.
3. Open `http://localhost:3000` in your browser.
4. Select a chat room from the list and start chatting!