From bba5f252f265e6102d2f052e9ca100efe318508f Mon Sep 17 00:00:00 2001 From: Santo Cariotti Date: Tue, 23 Aug 2022 18:45:18 +0200 Subject: Fix server bind --- server/src/main.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/server/src/main.rs b/server/src/main.rs index 3436e2c..8e44f7a 100644 --- a/server/src/main.rs +++ b/server/src/main.rs @@ -17,11 +17,10 @@ use tracing::Span; async fn main() { let app = create_app().await; - let addr: String = - std::env::var("ALLOWED_HOST").unwrap_or_else(|_| "localhost:3000".to_string()); + let addr = std::env::var("ALLOWED_HOST").unwrap_or_else(|_| "127.0.0.1:3000".to_string()); tracing::info!("Listening on {}", addr); - axum::Server::bind(&"127.0.0.1:3000".parse().unwrap()) + axum::Server::bind(&addr.parse().unwrap()) .serve(app.into_make_service()) .await .unwrap(); -- cgit v1.2.3-18-g5258