Compare commits
1 Commits
Author | SHA1 | Date |
---|---|---|
Cadey Ratio | adb0ebccf1 |
|
@ -4,6 +4,8 @@ extern crate tracing;
|
||||||
use color_eyre::eyre::Result;
|
use color_eyre::eyre::Result;
|
||||||
use hyper::{header::CONTENT_TYPE, Body, Response};
|
use hyper::{header::CONTENT_TYPE, Body, Response};
|
||||||
use prometheus::{Encoder, TextEncoder};
|
use prometheus::{Encoder, TextEncoder};
|
||||||
|
use std::net::IpAddr;
|
||||||
|
use std::str::FromStr;
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use warp::{path, Filter};
|
use warp::{path, Filter};
|
||||||
|
|
||||||
|
@ -234,7 +236,8 @@ async fn main() -> Result<()> {
|
||||||
|
|
||||||
warp::serve(site)
|
warp::serve(site)
|
||||||
.run((
|
.run((
|
||||||
[0, 0, 0, 0],
|
IpAddr::from_str(&std::env::var("HOST").unwrap_or("::".into()))
|
||||||
|
.expect("can't parse bindhost"),
|
||||||
std::env::var("PORT")
|
std::env::var("PORT")
|
||||||
.unwrap_or("3030".into())
|
.unwrap_or("3030".into())
|
||||||
.parse::<u16>()
|
.parse::<u16>()
|
||||||
|
|
Loading…
Reference in New Issue