feat: update axum
Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
parent
5b74e4f125
commit
a093c7830d
@ -5,10 +5,10 @@ resolver = "2"
|
|||||||
[workspace.dependencies]
|
[workspace.dependencies]
|
||||||
%%name%% = { path = "crates/%%name%%" }
|
%%name%% = { path = "crates/%%name%%" }
|
||||||
|
|
||||||
anyhow = { version = "1.0.71" }
|
anyhow = { version = "1" }
|
||||||
tokio = { version = "1", features = ["full"] }
|
tokio = { version = "1", features = ["full"] }
|
||||||
tracing = { version = "0.1", features = ["log"] }
|
tracing = { version = "0.1", features = ["log"] }
|
||||||
tracing-subscriber = { version = "0.3.17" }
|
tracing-subscriber = { version = "0.3.17" }
|
||||||
clap = { version = "4.3.4", features = ["derive", "env"] }
|
clap = { version = "4", features = ["derive", "env"] }
|
||||||
dotenv = { version = "0.15.0" }
|
dotenv = { version = "0.15" }
|
||||||
axum = { version = "0.6.18" }
|
axum = { version = "0.7" }
|
||||||
|
@ -33,8 +33,8 @@ async fn main() -> anyhow::Result<()> {
|
|||||||
let app = Router::new().route("/", get(root));
|
let app = Router::new().route("/", get(root));
|
||||||
|
|
||||||
tracing::info!("listening on {}", host);
|
tracing::info!("listening on {}", host);
|
||||||
axum::Server::bind(&host)
|
let listener = tokio::net::TcpListener::bind(host).await.unwrap();
|
||||||
.serve(app.into_make_service())
|
axum::serve(listener, app.into_make_service())
|
||||||
.await
|
.await
|
||||||
.unwrap();
|
.unwrap();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user