Skip to content

Commit

Permalink
Merge pull request #227 from slowtec/update-axum
Browse files Browse the repository at this point in the history
Update axum to v0.7
  • Loading branch information
pyrossh committed Dec 20, 2023
2 parents 774f201 + 5fe13a5 commit 253340f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Expand Up @@ -74,7 +74,7 @@ hex = { version = "0.4.3", optional = true }
tokio = { version = "1.0", optional = true, features = ["macros", "rt-multi-thread"] }
warp = { version = "0.3", default-features = false, optional = true }
rocket = { version = "0.5.0-rc.2", default-features = false, optional = true }
axum = { version = "0.6", default-features = false, features = ["http1", "tokio"], optional = true }
axum = { version = "0.7", default-features = false, features = ["http1", "tokio"], optional = true }
poem = { version = "1.3.30", default-features = false, features = ["server"], optional = true }
salvo = { version = "0.16", default-features = false, optional = true }

Expand Down
3 changes: 2 additions & 1 deletion examples/axum.rs
Expand Up @@ -18,7 +18,8 @@ async fn main() {
// Start listening on the given address.
let addr = SocketAddr::from(([127, 0, 0, 1], 3000));
println!("listening on {}", addr);
axum::Server::bind(&addr).serve(app.into_make_service()).await.unwrap();
let listener = tokio::net::TcpListener::bind(addr).await.unwrap();
axum::serve(listener, app.into_make_service()).await.unwrap();
}

// We use static route matchers ("/" and "/index.html") to serve our home
Expand Down

0 comments on commit 253340f

Please sign in to comment.