From 750ede9f21876d017d13d3e060b3ea62f468d606 Mon Sep 17 00:00:00 2001 From: baalajimaestro Date: Sun, 11 Dec 2022 22:44:39 +0530 Subject: [PATCH] Make bind address configurable Signed-off-by: baalajimaestro --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 282c99c..135b5fc 100644 --- a/src/main.rs +++ b/src/main.rs @@ -74,7 +74,7 @@ async fn main() -> std::io::Result<()> { .app_data(Data::clone(&data)) .service(paste_render) }) - .bind(("0.0.0.0", 8080))? + .bind(env::var("BIND_ADDRESS").unwrap_or("0.0.0.0:8080".to_string()))? .run() .await }