fix code
Some checks failed
release / release (push) Has been cancelled
test / cargo test (push) Has been cancelled

This commit is contained in:
Michal Vanko 2024-09-18 15:59:20 +02:00
parent b547bd9974
commit ea888a84ba

View File

@ -1,6 +1,7 @@
use axum::{self};
use tower_http::services::ServeDir;
use tower_livereload::LiveReloadLayer;
use tracing::info;
use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt};
mod blog_posts;
@ -45,8 +46,8 @@ async fn main() {
// run our app with hyper, listening globally on port 3080
let port = std::option_env!("PORT").unwrap_or("3080");
let addr = format!("0.0.0.0:{}", port);
let listener = tokio::net::TcpListener::bind(addr).await.unwrap();
info!("axum_server listening on http://{}", addr);
let listener = tokio::net::TcpListener::bind(&addr).await.unwrap();
info!("axum_server listening on http://{}", &addr);
axum::serve(listener, app).await.unwrap();
}