diff --git a/server/README.md b/server/README.md index 1bbbaa8..ac032ea 100644 --- a/server/README.md +++ b/server/README.md @@ -35,6 +35,7 @@ Run Just run `codechain-agent-hub` in your shell. To safely communicate with the Dashboard, please set the `PASSPHRASE` environment variable. The Dashboard program should use the same passphrase. +Also, you should set `NETWORK_ID` environment variable to print the network id in log messages. When you are using the `PASSPHRASE` you should use SSL over the connection. If you don't use the SSL, the `PASSPHRASE` is open to the internet. diff --git a/server/src/daily_reporter.rs b/server/src/daily_reporter.rs index 0d7bd06..1872aae 100644 --- a/server/src/daily_reporter.rs +++ b/server/src/daily_reporter.rs @@ -13,7 +13,7 @@ pub fn start( db_service: DBServiceSender, agent_service: AgentServiceSender, ) -> thread::JoinHandle<()> { - let network_id = std::env::var("NETWORK_ID").unwrap(); + let network_id = std::env::var("NETWORK_ID").expect("NETWORK_ID environment variable is needed"); thread::Builder::new() .name("daily reporter".to_string())