A basic chat server.
See video YouTube
-
A MongoDB database named chat with collections: accounts, messages.
-
An environment variable for the JWT secret key:
JWT_SECRET_PRIMARY
. This can contain any string you want, however it is recommended to be a 64 character cryptographically generated string. For security purposes, you should regenerate this string before eachcargo run
. Please note: This is not meant to be a secure chat platform LOL! It's a PoC / hobby project!
If on Mac or Linux, first rename config.sh.template to config.sh with mv config.sh.template config.sh
.
Edit config.sh, filling in the details for your MongoDB cluster.
Permit the current user to execute config.sh with chmod +x config.sh
.
Devl: source config.sh; cargo run
Prod: source config.sh; cargo run --release
If on Windows, first rename config.ps1.template to config.ps1 with Rename-Item "config.ps1.template config.ps1"
.
Edit config.ps1, filling in the details for your MongoDB cluster.
Devl: .\config.ps1; cargo run
Prod: .\config.ps1; cargo run --release