respect config file addr

This commit is contained in:
Michael Zhang 2020-04-20 00:39:38 -05:00
parent 9598242e60
commit 27102f1a58
Signed by: michael
GPG key ID: BDA47A31A3C8EE6B

View file

@ -196,11 +196,10 @@ async fn main() -> Result<()> {
config_file.read_to_string(&mut config_str).await?;
let config = toml::from_str::<Config>(&config_str)?;
let addr = config.addr.clone();
println!("Config: {:?}", config);
let fedhub = Fedhub::new(config)?;
let addr = SocketAddr::from(([127, 0, 0, 1], 3000));
let make_svc = make_service_fn(move |_conn| {
let fedhub = fedhub.clone();
let main = move |req| {