Skip to content

Commit

Permalink
Merge pull request #253 from wkmyws/master
Browse files Browse the repository at this point in the history
Compatible with Axum 0.7.9
  • Loading branch information
pyrossh authored Jan 2, 2025
2 parents 3ae5a2c + f38c399 commit 6ef52c6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion examples/axum-spa/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ async fn main() {
let app = Router::new().fallback(static_handler);

let addr = SocketAddr::from(([127, 0, 0, 1], 3000));
let listener = tokio::net::TcpListener::bind(addr).await.unwrap();
println!("listening on {}", addr);
axum::Server::bind(&addr).serve(app.into_make_service()).await.unwrap();
axum::serve(listener, app.into_make_service()).await.unwrap();
}

async fn static_handler(uri: Uri) -> impl IntoResponse {
Expand Down

0 comments on commit 6ef52c6

Please sign in to comment.