bind to 0.0.0.0

This commit is contained in:
Murphy 2023-07-03 01:37:14 -04:00
parent 6370e2ff0a
commit 156ea1ba66

View file

@ -22,7 +22,7 @@ async fn main() {
.parse::<u16>() .parse::<u16>()
.unwrap_or_else(|_| 8080); .unwrap_or_else(|_| 8080);
let addr = format!("127.0.0.1:{port}"); let addr = format!("0.0.0.0:{port}");
let Ok(listener) = TcpListener::bind(&addr).await else { let Ok(listener) = TcpListener::bind(&addr).await else {
println!("failed to bind {addr}"); println!("failed to bind {addr}");