Make bind address configurable

Signed-off-by: baalajimaestro <me@baalajimaestro.me>
This commit is contained in:
baalajimaestro 2022-12-11 22:44:39 +05:30
parent 48c5b5b7d5
commit 750ede9f21
Signed by: baalajimaestro
GPG key ID: F93C394FE9BBAFD5

View file

@ -74,7 +74,7 @@ async fn main() -> std::io::Result<()> {
.app_data(Data::clone(&data))
.service(paste_render)
})
.bind(("0.0.0.0", 8080))?
.bind(env::var("BIND_ADDRESS").unwrap_or("0.0.0.0:8080".to_string()))?
.run()
.await
}