[Add] ttpBind
This commit is contained in:
parent
7e9e834326
commit
a3f9e0ea3a
4 changed files with 25 additions and 9 deletions
|
|
@ -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 || {
|
||||
|
|
|
|||
Loading…
Reference in a new issue