generated from Patagia/template-nix
feat(controller): add listen-address flag
This commit is contained in:
parent
abd6748703
commit
a9a4c513f5
1 changed files with 8 additions and 1 deletions
|
@ -29,6 +29,13 @@ struct Cli {
|
|||
value_name = "LOG_TO_STDERR"
|
||||
)]
|
||||
log_stderr: bool,
|
||||
|
||||
#[arg(
|
||||
long = "listen-address",
|
||||
default_value = "0.0.0.0:9474",
|
||||
value_name = "LISTEN_ADDRESS"
|
||||
)]
|
||||
listen_address: String,
|
||||
}
|
||||
|
||||
#[tokio::main]
|
||||
|
@ -39,7 +46,7 @@ async fn main() -> Result<()> {
|
|||
tracing::info!("Patagia Controller");
|
||||
|
||||
let config = ConfigDropshot {
|
||||
bind_address: SocketAddr::from_str("0.0.0.0:9474").unwrap(),
|
||||
bind_address: SocketAddr::from_str(&args.listen_address).unwrap(),
|
||||
..Default::default()
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue