first commit

This commit is contained in:
creations 2025-05-31 18:20:37 -04:00
commit 2da598738b
Signed by: creations
GPG key ID: 8F553AA4320FC711
15 changed files with 3758 additions and 0 deletions

12
src/db/redis_helper.rs Normal file
View file

@ -0,0 +1,12 @@
use redis::Client;
use redis::aio::MultiplexedConnection;
use std::env;
pub async fn connect() -> MultiplexedConnection {
let url = env::var("REDIS_URL").expect("REDIS_URL is required");
let client = Client::open(url).expect("Failed to create Redis client");
client
.get_multiplexed_tokio_connection()
.await
.expect("Failed to connect to Redis")
}