Add serve function and remove Server re-export (#1868)

This commit is contained in:
David Pedersen
2023-03-23 20:25:36 +01:00
parent 2ae0cdf7cf
commit d153719bef
86 changed files with 641 additions and 564 deletions
+1
View File
@@ -6,4 +6,5 @@ publish = false
[dependencies]
axum = { path = "../../axum" }
hyper = { version = "0.14", features = ["full"] }
tokio = { version = "1.0", features = ["full"] }
+1 -1
View File
@@ -17,7 +17,7 @@ async fn main() {
// run it
let addr = SocketAddr::from(([127, 0, 0, 1], 3000));
println!("listening on {}", addr);
axum::Server::bind(&addr)
hyper::Server::bind(&addr)
.serve(app.into_make_service())
.with_graceful_shutdown(shutdown_signal())
.await