Chat room application backend which allows you to create, join, leave chat rooms & send message to other anonymous users. Built using Actix Web, Actix & Actix WebSocket actors
cargo build
cargo run
docker build ./ -t actix-chat
docker run --rm -p 8080:8080 actix-chat
First, you will need to connect to the app by web socket:
Ex: wss://rusty-messaging.herokuapp.com/
Please, connect over wss whenever you can since it is enabled on the server
To execute any operation you have to send a json which has the following format:
{
"ty": "<type>",
"data": "<message>"
}
-
{ "ty": "Create", "data": "" }
- Response:
{ "ty": "Info", "data": "<room-id>" }
- Response:
-
{ "ty": "Join", "data": "<room-id>" }
- Response:
{ "ty": "Info", "data": "Joined" }
- Response:
-
{ "ty": "Leave", "data": "" }
- Response:
{ "ty": "Info", "data": "Room leaved" }
- Response:
-
{ "ty": "Msg", "data": "Hello, World" }
If an error occurs, the server will send back a json with the following format:
{
"ty": "Err",
"data": "<error-message>"
}
- Add a redis db to store messages & active rooms