diff options
author | metamuffin <metamuffin@disroot.org> | 2024-04-28 19:45:54 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2024-04-28 19:45:54 +0200 |
commit | f5fc6a02fbdd48a66582b59078afa3202873eadc (patch) | |
tree | e64c5f9a1c3ee4d0b7673ecf63492cb6550eca1b /src | |
parent | 90816038dce23773693881b53fb8327a6ddc7696 (diff) | |
download | meta-adservices-f5fc6a02fbdd48a66582b59078afa3202873eadc.tar meta-adservices-f5fc6a02fbdd48a66582b59078afa3202873eadc.tar.bz2 meta-adservices-f5fc6a02fbdd48a66582b59078afa3202873eadc.tar.zst |
configure port
Diffstat (limited to 'src')
-rw-r--r-- | src/main.rs | 4 | ||||
-rw-r--r-- | src/state.rs | 1 |
2 files changed, 5 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs index 8a20982..6887fe7 100644 --- a/src/main.rs +++ b/src/main.rs @@ -32,6 +32,10 @@ async fn main() { let state = Logic::new(config); let _ = rocket::build() + .configure(rocket::Config { + port: state.config.port, + ..Default::default() + }) .attach(AdHoc::on_response("set server header", |_req, res| { res.set_header(Header::new("server", "meta adservices")); Box::pin(async {}) diff --git a/src/state.rs b/src/state.rs index 4de21b4..368e76b 100644 --- a/src/state.rs +++ b/src/state.rs @@ -16,6 +16,7 @@ pub struct Config { impression_weight_falloff: f64, pub image_base: PathBuf, database_path: PathBuf, + pub port: u16, pub ads: HashMap<String, AdInfo>, } |