A simple server implementing chat-app like functionality.
cargo run --release <db-path>
For example:
cargo run --release main.db
Will start the server, creating main.db
if it does not exists.
cargo watch -x run --clear --no-gitignore
To connect to the server:
websocat ws://localhost:3030/chat/:name
Where :name
represents the room name to connect to. (e.g. websocat ws://localhost:3030/chat/public
connects to the 'public' room)
For running tests, simply do:
cargo test
This may take some time due to some of the tests that deal with large chunk of total writes to the DB.