aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main.rs4
-rw-r--r--src/state.rs1
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>,
}