mirror of
https://github.com/Steffo99/todocolors.git
synced 2024-11-23 16:54:18 +00:00
Display AXUM_HOST in logs when starting server
This commit is contained in:
parent
a266d3e6f0
commit
873794eee5
1 changed files with 3 additions and 2 deletions
|
@ -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");
|
||||||
|
|
Loading…
Reference in a new issue