feat: add redis
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
mod db;
|
||||
mod redis;
|
||||
mod response;
|
||||
mod error;
|
||||
pub mod middlewares;
|
||||
@ -6,6 +7,7 @@ pub mod models;
|
||||
pub mod services;
|
||||
pub mod routes;
|
||||
pub mod utils;
|
||||
pub mod workflow;
|
||||
|
||||
use axum::Router;
|
||||
use axum::http::{HeaderValue, Method};
|
||||
@ -37,6 +39,10 @@ async fn main() -> anyhow::Result<()> {
|
||||
|
||||
let db = db::init_db().await?;
|
||||
|
||||
// initialize Redis connection
|
||||
let redis_pool = redis::init_redis().await?;
|
||||
redis::set_redis_pool(redis_pool)?;
|
||||
|
||||
// run migrations
|
||||
migration::Migrator::up(&db, None).await.expect("migration up");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user