fix(bonfire): use fred for redis

https://github.com/aembke/fred.rs
This commit is contained in:
Bob Bobs
2024-02-01 19:00:45 -07:00
parent 25016efbc2
commit 88c2232a6c
4 changed files with 518 additions and 331 deletions

View File

@@ -29,6 +29,10 @@ async fn main() {
// Start accepting new connections and spawn a client for each connection.
while let Ok((stream, addr)) = listener.accept().await {
websocket::spawn_client(database::get_db(), stream, addr);
async_std::task::spawn(async move {
info!("User connected from {addr:?}");
websocket::client(database::get_db(), stream, addr).await;
info!("User disconnected from {addr:?}");
});
}
}