feat: adapt example in README.md to compile with axum-0.7.*

This commit is contained in:
Alex Ellwein 2023-12-08 12:28:17 +01:00 committed by Paul Z
parent e9ed927fd9
commit 7746e6f682

View file

@ -52,10 +52,8 @@ async fn main() {
.layer(oidc_auth_service) .layer(oidc_auth_service)
.layer(session_service); .layer(session_service);
axum::Server::bind(&"[::]:8080".parse().unwrap()) let listener = TcpListener::bind("[::]:8080").await.unwrap();
.serve(app.into_make_service()) axum::serve(listener, app.into_make_service()).await.unwrap();
.await
.unwrap();
} }
``` ```