Handle 404 fallback.

This commit is contained in:
2026-09-25 17:57:49 +02:00
parent 37a2b7b5dc
commit 94a5acc394
3 changed files with 11 additions and 3 deletions
+3 -2
View File
@@ -30,9 +30,10 @@ async fn main() {
let host = env::var("HOST").expect("HOST must be set");
let port = env::var("PORT").expect("PORT must be set");
let listener = TcpListener::bind(format!("{}:{}", host, port))
let addr = format!("{}:{}", host, port);
let listener = TcpListener::bind(&addr)
.await
.expect("Failed to bind to address");
.expect(&format!("Failed to bind to address: {}", addr));
tracing::info!("Starting server at {}:{}", host, port);
axum::serve(listener, routes::create_router(pool).into_make_service())