File tree Expand file tree Collapse file tree 3 files changed +18
-22
lines changed
Expand file tree Collapse file tree 3 files changed +18
-22
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ use utoipa_swagger_ui::SwaggerUi;
1010/// API + Swagger UI 라우터 통합
1111pub fn api_routes ( ) -> Router < AppState > {
1212 let mut router = Router :: new ( ) ;
13-
13+
1414 #[ cfg( debug_assertions) ]
1515 {
1616 router = router. merge ( SwaggerUi :: new ( "/docs" ) . url ( "/swagger.json" , ApiDoc :: merged ( ) ) ) ;
Original file line number Diff line number Diff line change 1+ pub mod api;
2+ pub mod config;
3+ pub mod connection;
4+ pub mod dto;
5+ pub mod entity;
6+ pub mod middleware;
7+ pub mod service;
8+ pub mod state;
9+ pub mod utils;
Original file line number Diff line number Diff line change 1- use crate :: api:: v0:: routes:: routes:: api_routes;
2- use crate :: config:: db_config:: DbConfig ;
3- use crate :: middleware:: cors:: cors_layer;
4- use crate :: state:: AppState ;
5- use crate :: utils:: logger:: init_tracing;
6- use axum:: Router ;
71use std:: net:: SocketAddr ;
8- use tower_http:: compression:: CompressionLayer ;
9- use tracing:: { error, info} ;
10- use crate :: connection:: database:: establish_connection;
11-
12- mod api;
13- mod config;
14- mod connection;
15- mod dto;
16- mod entity;
17- mod middleware;
18- mod service;
19- mod state;
20- mod utils;
2+ use axum:: Router ;
3+ use AxumKit :: api:: v0:: routes:: routes:: api_routes;
4+ use AxumKit :: config:: db_config:: DbConfig ;
5+ use AxumKit :: connection:: database:: establish_connection;
6+ use AxumKit :: middleware:: cors:: cors_layer;
7+ use AxumKit :: state:: AppState ;
8+ use AxumKit :: utils:: logger:: init_tracing;
219
2210pub async fn run_server ( ) -> anyhow:: Result < ( ) > {
2311 let conn = establish_connection ( ) . await ;
@@ -30,12 +18,11 @@ pub async fn run_server() -> anyhow::Result<()> {
3018 let app = Router :: new ( )
3119 . merge ( api_routes ( ) )
3220 . layer ( cors_layer ( ) )
33- . layer ( CompressionLayer :: new ( ) )
3421 . with_state ( AppState {
3522 conn
3623 } ) ;
3724
38- info ! ( "Starting server at: {}" , server_url) ;
25+ println ! ( "Starting server at: {}" , server_url) ;
3926
4027 let listener = tokio:: net:: TcpListener :: bind ( & server_url) . await ?;
4128 axum:: serve (
You can’t perform that action at this time.
0 commit comments