diff --git a/README.md b/README.md index 655a69b..a138caa 100644 --- a/README.md +++ b/README.md @@ -7,5 +7,5 @@ A Rust HTTP service that allows you to watch videos together with friends. ```shell $ cargo run --release # The server should listen at http://127.0.0.1:3000/ by default, -# but you can use the HOST and PORT environment variables to override this +# but you can use the IP and PORT environment variables to override this ``` diff --git a/src/main.rs b/src/main.rs index 4ae840a..c887edd 100644 --- a/src/main.rs +++ b/src/main.rs @@ -136,7 +136,7 @@ async fn main() { .or(warb::path::end().and(warb::fs::file("frontend/index.html"))) .or(warb::fs::dir("frontend")); - let host = std::env::var("HOST") + let ip = std::env::var("IP") .ok() .and_then(|s| s.parse::().ok()) .unwrap_or_else(|| [127, 0, 0, 1].into()); @@ -145,6 +145,6 @@ async fn main() { .and_then(|s| s.parse::().ok()) .unwrap_or(3000); - println!("Listening at http://{}:{} ...", &host, &port); - warb::serve(routes).run((host, port)).await; + println!("Listening at http://{}:{} ...", &ip, &port); + warb::serve(routes).run((ip, port)).await; }