Skip to content

Commit

Permalink
chore: port http ecosystem to hyper 1 (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
Threated committed Aug 7, 2024
1 parent 42313c5 commit fee8976
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
17 changes: 8 additions & 9 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,11 @@ documentation = "https://github.com/samply/spot"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
axum = "0.6.12"
#axum-macros = "0.3.7"
clap = { version = "4.2.1", features = ["env", "derive"] }
serde = { version = "1.0.159", features = ["serde_derive"] }
serde_json = "1.0.96"
tokio = { version = "1.27.0", features = ["full"] }
axum = "0.7"
clap = { version = "4", features = ["env", "derive"] }
serde = { version = "1", features = ["serde_derive"] }
serde_json = "1"
tokio = { version = "1", features = ["full"] }
beam-lib = { git = "https://github.com/samply/beam", branch = "develop", features=["http-util"] }
once_cell = "1"
async-sse = "5.1"
Expand All @@ -22,11 +21,11 @@ futures-util = { version = "0.3", default-features = false, features = ["std", "
# Logging
tracing = "0.1.37"
tracing-subscriber = { version = "0.3.17", features = ["env-filter"] }
reqwest = { version = "0.11.20", default-features = false, features = ["stream", "default-tls"] }
tower-http = { version = "0.4.4", features = ["cors"] }
reqwest = { version = "0.12", default-features = false, features = ["stream", "default-tls"] }
tower-http = { version = "0.5", features = ["cors"] }

[build-dependencies]
build-data = "0.1.4"
build-data = "0.2.1"

[profile.release]
#opt-level = "z" # Optimize for size.
Expand Down
5 changes: 2 additions & 3 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use serde_json::Value;
use tower_http::cors::CorsLayer;
use tracing::{info, warn, Level};
use tracing_subscriber::{util::SubscriberInitExt, EnvFilter};
use tokio::{io::AsyncWriteExt, sync::{mpsc, Mutex}};
use tokio::{io::AsyncWriteExt, net::TcpListener, sync::{mpsc, Mutex}};
use futures_util::{TryFutureExt, TryStreamExt};
use health::{BeamStatus, HealthOutput, Verdict};

Expand Down Expand Up @@ -88,8 +88,7 @@ async fn main() {

banner::print_banner();

axum::Server::bind(&CONFIG.bind_addr)
.serve(app.into_make_service())
axum::serve(TcpListener::bind(CONFIG.bind_addr).await.unwrap(), app.into_make_service())
.await
.unwrap();
}
Expand Down

0 comments on commit fee8976

Please sign in to comment.