diff options
author | Santo Cariotti <santo@dcariotti.me> | 2022-08-23 18:45:18 +0200 |
---|---|---|
committer | Santo Cariotti <santo@dcariotti.me> | 2022-08-23 18:45:18 +0200 |
commit | bba5f252f265e6102d2f052e9ca100efe318508f (patch) | |
tree | 45adf8b7e5198659dd313d77a87d1119b031d421 /server/src | |
parent | f66a763cfc275c87407b5a9559628802f9646b95 (diff) |
Fix server bind
Diffstat (limited to 'server/src')
-rw-r--r-- | server/src/main.rs | 5 |
1 files 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(); |