diff options
| author | mo khan <mo@mokhan.ca> | 2025-06-26 14:42:02 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2025-06-26 14:42:02 -0600 |
| commit | 73688038a35d0ceee3d45bd15825a38bb26e74c0 (patch) | |
| tree | 39ab688e48bbd131b0105fcef31b18890bd5c6cc /src/main.rs | |
| parent | 031d4ba92e69966ae91bbebd9ec797e6c115c2f0 (diff) | |
chore: update the BIND_ADDR variable and read it
Diffstat (limited to 'src/main.rs')
| -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(); |
