aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs
index d2f83a4..ba319d9 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -7,7 +7,7 @@ use axum::{
};
use serde::{Deserialize, Serialize};
-use std::{net::SocketAddr, time::Duration};
+use std::{net::SocketAddr, time::Duration, str::FromStr};
use tower::{BoxError, ServiceBuilder};
use tower_http::trace::TraceLayer;
@@ -49,7 +49,7 @@ async fn main() {
.into_inner(),
);
- let addr = SocketAddr::from(([127,0,0,1], 3000));
+ let addr = SocketAddr::from_str(std::env::var("BIND_ADDR").unwrap().as_str().into()).unwrap();
tracing::info!("Listening on {}", addr);
axum::Server::bind(&addr)