update axum to 7
This commit is contained in:
parent
660f7644fc
commit
ba3ad10fff
4 changed files with 125 additions and 38 deletions
|
@ -22,8 +22,10 @@ async fn main() {
|
|||
let app = app::create(feeds);
|
||||
|
||||
tracing::debug!("Listening on {}", addr);
|
||||
axum::Server::bind(&addr)
|
||||
.serve(app.into_make_service())
|
||||
let listener = tokio::net::TcpListener::bind(&addr)
|
||||
.await
|
||||
.expect("Faileds to listen on the specified address");
|
||||
axum::serve(listener, app.into_make_service())
|
||||
.with_graceful_shutdown(signals::shutdown())
|
||||
.await
|
||||
.expect("Failed to start server");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue