mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-11 18:04:18 +00:00
Parse http CLI args for HTTP server
This commit is contained in:
@@ -140,6 +140,19 @@ impl ClientConfig {
|
||||
}
|
||||
}
|
||||
|
||||
/* HTTP related arguments */
|
||||
|
||||
if args.is_present("http") {
|
||||
config.http_conf.enabled = true;
|
||||
}
|
||||
|
||||
if let Some(listen_address) = args.value_of("http-address") {
|
||||
config.http_conf.listen_address = listen_address.to_string();
|
||||
}
|
||||
if let Some(listen_port) = args.value_of("http-port") {
|
||||
config.http_conf.listen_port = listen_port.to_string();
|
||||
}
|
||||
|
||||
match args.value_of("db") {
|
||||
Some("disk") => config.db_type = DBType::Disk,
|
||||
Some("memory") => config.db_type = DBType::Memory,
|
||||
|
||||
Reference in New Issue
Block a user