Log address that web server binds to

This commit is contained in:
Joscha 2023-10-21 18:38:54 +02:00
parent b587a87d50
commit c051e42c2e

View file

@ -8,6 +8,7 @@ mod r#static;
use axum::{extract::DefaultBodyLimit, routing::get, Router}; use axum::{extract::DefaultBodyLimit, routing::get, Router};
use axum_extra::routing::RouterExt; use axum_extra::routing::RouterExt;
use log::info;
use crate::somehow; use crate::somehow;
@ -66,7 +67,9 @@ pub async fn run(server: Server) -> somehow::Result<()> {
.fallback(get(r#static::static_handler)) .fallback(get(r#static::static_handler))
.with_state(server.clone()); .with_state(server.clone());
axum::Server::bind(&server.config.web_address) let addr = &server.config.web_address;
info!("Launching web server at http://{}", addr);
axum::Server::bind(addr)
.serve(app.into_make_service()) .serve(app.into_make_service())
.await?; .await?;