diff options
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs index 3d0831e..778aa4a 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,6 +1,5 @@ use std::env; use log::{error,info,debug}; -use env_logger; use surf::Url; use kittybox_micropub as micropub; @@ -42,7 +41,7 @@ async fn main() -> Result<(), std::io::Error> { } let media_endpoint: Option<String> = env::var("MEDIA_ENDPOINT").ok(); - let host = env::var("SERVE_AT").ok().unwrap_or("0.0.0.0:8080".to_string()); + let host = env::var("SERVE_AT").ok().unwrap_or_else(|| "0.0.0.0:8080".to_string()); let app = micropub::get_app_with_redis(token_endpoint, redis_uri, media_endpoint).await; app.listen(host).await } \ No newline at end of file |