[Add] ttpBind

This commit is contained in:
Alois 2026-05-16 19:02:12 +02:00
commit a3f9e0ea3a
4 changed files with 25 additions and 9 deletions

View file

@ -30,7 +30,8 @@ pub async fn start(port: u16) -> anyhow::Result<()> {
config.alpn_protocols = vec![b"h2".to_vec(), b"http/1.1".to_vec()];
let addr = format!("0.0.0.0:{port}");
let bind_addr = std::env::var("BIND_ADDRESS").unwrap_or_else(|_| "0.0.0.0".to_string());
let addr = format!("{}:{}", bind_addr, port);
log!(" Server on {}", addr);
HttpServer::new(move || {