feat: port selection

This commit is contained in:
Per Stark
2025-05-30 07:44:26 +02:00
parent 81825e2525
commit d2772bd09c
6 changed files with 11 additions and 22 deletions

View File

@@ -56,8 +56,9 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
html_state,
});
info!("Listening on 0.0.0.0:3000");
let listener = tokio::net::TcpListener::bind("0.0.0.0:3000").await?;
info!("Starting server listening on 0.0.0.0:{}", config.http_port);
let serve_address = format!("0.0.0.0:{}", config.http_port);
let listener = tokio::net::TcpListener::bind(serve_address).await?;
axum::serve(listener, app).await?;
Ok(())