1
Fork 0
mirror of https://github.com/Steffo99/todocolors.git synced 2024-11-21 15:54:18 +00:00

Display AXUM_HOST in logs when starting server

This commit is contained in:
Steffo 2024-10-03 12:59:06 +02:00
parent a266d3e6f0
commit 873794eee5
Signed by: steffo
GPG key ID: 5ADA3868646C3FC0

View file

@ -37,8 +37,9 @@ async fn main() {
) )
); );
log::info!("Starting web server!"); let host = std::net::SocketAddr::from_str(&config::AXUM_HOST).expect("AXUM_HOST to be a valid SocketAddr");
axum::Server::bind(&std::net::SocketAddr::from_str(&config::AXUM_HOST).expect("AXUM_HOST to be a valid SocketAddr")) log::info!("Starting web server on: {host:?}");
axum::Server::bind(&host)
.serve(router.into_make_service()) .serve(router.into_make_service())
.await .await
.expect("to be able to run the Axum server"); .expect("to be able to run the Axum server");