Skip to content

Commit 9c13e80

Browse files
committed
fix: Listen on all interfaces
1 parent 2f3cba8 commit 9c13e80

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

rust/usuba/src/bin/usuba.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ pub async fn main() -> Result<(), UsubaError> {
1414
.finish();
1515
tracing::subscriber::set_global_default(subscriber.with(Layer::default().pretty()))?;
1616

17-
let socket_address: SocketAddr = "127.0.0.1:8080".parse()?;
17+
let port = std::option_env!("PORT").unwrap_or("8080");
18+
let socket_address: SocketAddr = format!("0.0.0.0:{port}").parse()?;
1819
let listener = tokio::net::TcpListener::bind(socket_address).await?;
1920

2021
info!("Server listening on {}", socket_address);

0 commit comments

Comments
 (0)