diff --git a/src/main.rs b/src/main.rs index f6e38f7..26f01f5 100644 --- a/src/main.rs +++ b/src/main.rs @@ -11,6 +11,8 @@ use async_std::task; const APP_VERSION: &'static str = env!("CARGO_PKG_VERSION"); const DEFAULT_CONFIG_FILE_NAME: &str = "/etc/s0_logger.cfg"; +const DEFAULT_IP_ADDRESS: &str = "127.0.0.1"; +const DEFAULT_IP_PORT: &str = "6310"; fn main() { let cli_args = clap_app!(s0_meter => @@ -42,8 +44,11 @@ fn main() { println!("Will NOT access GPIO pins"); } + let rest_ip_addr = DEFAULT_IP_ADDRESS; + let rest_ip_port = DEFAULT_IP_PORT; + let rest_api_config = rest_api::RestApiConfig { - ip_and_port: String::from("127.0.0.1:8080"), + ip_and_port: format!("{}:{}", &rest_ip_addr, &rest_ip_port), get_channels: fake_get_channels, get_pulses_by_channel: fake_get_pulses_by_channel, };