From 21627fb3b9345e9618a869b08d309e7b40ba2942 Mon Sep 17 00:00:00 2001 From: Artturin Date: Sat, 4 Jan 2025 01:20:22 +0200 Subject: [PATCH] Make the port configurable --- backend/src/main.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/backend/src/main.rs b/backend/src/main.rs index 96a2df4..d9b1fe7 100644 --- a/backend/src/main.rs +++ b/backend/src/main.rs @@ -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);