Skip to content

Commit

Permalink
add compression to server again
Browse files Browse the repository at this point in the history
  • Loading branch information
Timtam committed Apr 11, 2024
1 parent 367ebd2 commit 4368339
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ parking_lot = "0.12.1"
rand = "0.8.5"
regex = "1.10.3"
rocket = { version = "0.5.0", features = ["json", "secrets"]}
rocket_async_compression = "0.6.0"
rocket_db_pools = { version = "0.1.0", default-features = false, features = ["sqlx_sqlite" ]}
rocket_okapi = { version = "0.8.0", default-features = false, features = ["swagger", "rapidoc", "secrets", "rocket_db_pools"]}
rusty_ytdl = "0.7.0"
Expand Down
2 changes: 2 additions & 0 deletions server/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ use rocket::{
tokio::sync::broadcast::channel,
Build, Config, Rocket,
};
use rocket_async_compression::Compression;
use rocket_db_pools::{sqlx, Database};
use rocket_okapi::{openapi_get_routes, rapidoc::*, settings::UrlObject, swagger_ui::*};
use routes::{games as games_routes, hits as hits_routes, users as users_routes};
Expand Down Expand Up @@ -77,6 +78,7 @@ fn rocket_from_config(figment: Figment) -> Rocket<Build> {
.attach(HitsterConfig::init())
.attach(migrations_fairing)
.attach(HitsterDownloader::default())
.attach(Compression::fairing())
.mount("/", routes![index, files,])
.mount("/api/", routes![api_index, games_routes::events])
.mount(
Expand Down

0 comments on commit 4368339

Please sign in to comment.