Add env option for parameters
This commit is contained in:
parent
e7f7afe4de
commit
b45d0d9a97
1 changed files with 3 additions and 0 deletions
|
@ -37,6 +37,7 @@ fn main() {
|
||||||
Arg::with_name("host")
|
Arg::with_name("host")
|
||||||
.short("h")
|
.short("h")
|
||||||
.long("host")
|
.long("host")
|
||||||
|
.env("HOST")
|
||||||
.required(true)
|
.required(true)
|
||||||
.takes_value(true),
|
.takes_value(true),
|
||||||
)
|
)
|
||||||
|
@ -44,6 +45,7 @@ fn main() {
|
||||||
Arg::with_name("port")
|
Arg::with_name("port")
|
||||||
.short("p")
|
.short("p")
|
||||||
.long("port")
|
.long("port")
|
||||||
|
.env("PORT")
|
||||||
.takes_value(true)
|
.takes_value(true)
|
||||||
.default_value("1883"),
|
.default_value("1883"),
|
||||||
)
|
)
|
||||||
|
@ -51,6 +53,7 @@ fn main() {
|
||||||
Arg::with_name("lifx-secret")
|
Arg::with_name("lifx-secret")
|
||||||
.short("s")
|
.short("s")
|
||||||
.long("lifx-secret")
|
.long("lifx-secret")
|
||||||
|
.env("LIFX_SECRET")
|
||||||
.required(true)
|
.required(true)
|
||||||
.takes_value(true),
|
.takes_value(true),
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue