Make the port configurable
This commit is contained in:
parent
9ebdbdb36a
commit
21627fb3b9
|
@ -67,7 +67,10 @@ async fn main() -> std::io::Result<()> {
|
|||
env_logger::init();
|
||||
|
||||
let address = "127.0.0.1";
|
||||
let port = 8080;
|
||||
let port = std::env::var("EXAMPLE_ELM_APP_PORT")
|
||||
.unwrap_or("8080".to_string())
|
||||
.parse()
|
||||
.unwrap();
|
||||
|
||||
info!("Starting server at http://{}:{}", address, port);
|
||||
|
||||
|
|
Loading…
Reference in a new issue