diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/main.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs index 884460fd..0a1cd5a5 100644 --- a/src/main.rs +++ b/src/main.rs @@ -6,7 +6,9 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> { use std::sync::Arc; use tonic::transport::Server; - let addr = "[::1]:50051".parse()?; + let addr = std::env::var("BIND_ADDR") + .unwrap_or_else(|_| "[::1]:50051".to_string()) + .parse()?; let (_health_reporter, health_service) = tonic_health::server::health_reporter(); |
