diff --git a/README.md b/README.md index 098a654..121998c 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,15 @@ ![Screenshot](screenshots/screenshot.webp) +## Configuration +Empede is configured using environment variables: + +| Name | Default | Description | +| ----------- | ------------ | --------------------------------- | +| MPD_HOST | localhost | MPD server host | +| MPD_PORT | 6600 | MPD server port | +| EMPEDE_BIND | 0.0.0.0:8080 | Address for Empede to bind to | + ## Running ### Linux 1. Download and extract the [latest release](https://git.sijman.nl/_/empede/releases) diff --git a/src/main.rs b/src/main.rs index 5998189..d1053fa 100644 --- a/src/main.rs +++ b/src/main.rs @@ -196,6 +196,8 @@ async fn main() -> tide::Result<()> { app.at("/static").serve_dir("static/")?; - app.listen("0.0.0.0:8080").await?; + let bind = std::env::var("EMPEDE_BIND").unwrap_or("0.0.0.0:8080".to_string()); + app.listen(bind).await?; + Ok(()) }