diff --git a/src/main.rs b/src/main.rs index eb6dd4b..0a8a8af 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,23 +1,17 @@ use std::{env, net::SocketAddr}; -use app_state::AppState; use axum::{ middleware, response::{IntoResponse, Response}, Json, Router, Server, }; -use db::DB; use dotenv::dotenv; -use error::Error; use serde_json::json; use tracing::{debug, info}; -mod app_state; -mod ctx; -mod db; -mod error; +mod shared; -use crate::error::Result; +use crate::shared::{app_state::AppState, db::DB, error::Error, error::Result}; #[tokio::main] async fn main() -> Result<()> { diff --git a/src/app_state.rs b/src/shared/app_state.rs similarity index 100% rename from src/app_state.rs rename to src/shared/app_state.rs diff --git a/src/ctx.rs b/src/shared/ctx.rs similarity index 100% rename from src/ctx.rs rename to src/shared/ctx.rs diff --git a/src/db.rs b/src/shared/db.rs similarity index 100% rename from src/db.rs rename to src/shared/db.rs diff --git a/src/error.rs b/src/shared/error.rs similarity index 100% rename from src/error.rs rename to src/shared/error.rs diff --git a/src/shared/mod.rs b/src/shared/mod.rs new file mode 100644 index 0000000..109a25a --- /dev/null +++ b/src/shared/mod.rs @@ -0,0 +1,4 @@ +pub mod app_state; +pub mod ctx; +pub mod db; +pub mod error;