Make the port configurable

This commit is contained in:
Artturin 2025-01-04 01:20:22 +02:00
parent 9ebdbdb36a
commit 21627fb3b9

View file

@ -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);