Reformats Code
This commit is contained in:
10
src/main.rs
10
src/main.rs
@@ -1,13 +1,12 @@
|
||||
mod config;
|
||||
mod handler;
|
||||
mod middleware;
|
||||
mod model;
|
||||
mod route;
|
||||
mod config;
|
||||
mod service;
|
||||
|
||||
use crate::config::config_server;
|
||||
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() {
|
||||
dotenv::dotenv().ok();
|
||||
@@ -16,8 +15,9 @@ async fn main() {
|
||||
let app = route::create_route();
|
||||
|
||||
println!("🚀 Server started successfully");
|
||||
let listener = tokio::net::TcpListener::bind(
|
||||
format!("{}:{}", server_config.host, server_config.port)
|
||||
).await.unwrap();
|
||||
let listener =
|
||||
tokio::net::TcpListener::bind(format!("{}:{}", server_config.host, server_config.port))
|
||||
.await
|
||||
.unwrap();
|
||||
axum::serve(listener, app).await.unwrap();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user