Skip to content

Commit

Permalink
Read environment variables WS_PORT and HTTP_PORT
Browse files Browse the repository at this point in the history
  • Loading branch information
Charles-Johnson committed Oct 18, 2021
1 parent ca7d28c commit f76e6cc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions node/src/opt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ pub struct Opt {
long,
default_value = "8000",
value_name = "PORT",
help = "Port for the GraphQL HTTP server"
help = "Port for the GraphQL HTTP server",
env = "HTTP_PORT"
)]
pub http_port: u16,
#[structopt(
Expand All @@ -117,7 +118,8 @@ pub struct Opt {
long,
default_value = "8001",
value_name = "PORT",
help = "Port for the GraphQL WebSocket server"
help = "Port for the GraphQL WebSocket server",
env = "WS_PORT"
)]
pub ws_port: u16,
#[structopt(
Expand Down

0 comments on commit f76e6cc

Please sign in to comment.