diff --git a/src/exposition/http/mod.rs b/src/exposition/http/mod.rs index 8c3fc7f8..d1b4472b 100644 --- a/src/exposition/http/mod.rs +++ b/src/exposition/http/mod.rs @@ -19,11 +19,14 @@ struct AppState { } pub async fn serve(config: Arc, samplers: Arc]>>) { - let state = Arc::new(AppState { config, samplers }); + let state = Arc::new(AppState { + config: config.clone(), + samplers, + }); let app: Router = app(state); - let listener = TcpListener::bind("0.0.0.0:4242") + let listener = TcpListener::bind(config.general().listen()) .await .expect("failed to listen");