Add a better structure in the project

This commit is contained in:
2025-08-15 18:02:30 -04:00
parent 985443ca91
commit 611301dfda
10 changed files with 178 additions and 7 deletions

View File

@@ -2,7 +2,7 @@
use std::process::exit;
use axum::{Router, routing::get};
use axum::Router;
use dotenvy::dotenv;
use tokio::signal;
use tower_http::trace::TraceLayer;
@@ -10,7 +10,8 @@ use tracing::{error, info};
use tracing_subscriber::{EnvFilter, fmt, prelude::*};
mod config;
mod health;
mod handlers;
mod routes;
use config::Config;
@@ -41,7 +42,8 @@ async fn main() {
// Build the Axum router
let app = Router::new()
.route("/health", get(health::health))
// .nest("/health", routes::health::health::health_routes())
.nest("/health", routes::health::health::health_routes())
.layer(TraceLayer::new_for_http());
// Run the server