feat: update axum

Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
2023-12-23 13:39:28 +01:00
parent 5b74e4f125
commit a093c7830d
2 changed files with 6 additions and 6 deletions

View File

@@ -33,8 +33,8 @@ async fn main() -> anyhow::Result<()> {
let app = Router::new().route("/", get(root));
tracing::info!("listening on {}", host);
axum::Server::bind(&host)
.serve(app.into_make_service())
let listener = tokio::net::TcpListener::bind(host).await.unwrap();
axum::serve(listener, app.into_make_service())
.await
.unwrap();
}