fix the api not working

This commit is contained in:
Chris Cochrun 2024-11-08 13:04:56 -06:00
parent 21fe5a61a4
commit 80c8a3e8a8

View file

@ -29,9 +29,7 @@ impl RootSpanBuilder for DomainRootSpanBuilder {
let info = request.connection_info();
let ip = info.realip_remote_addr().expect("hi");
let location = request.path();
if location.ends_with("/") {
info!(?method, ip, location);
}
info!(?method, ip, location);
tracing_actix_web::root_span!(request)
// let client_id: &str = todo!("Somehow extract it from the authorization header");
@ -82,7 +80,6 @@ async fn main() -> std::io::Result<()> {
App::new()
.wrap(TracingLogger::<DomainRootSpanBuilder>::new())
.app_data(TempFileConfig::default().directory("./tmp"))
.service(Files::new("/", "./public").index_file("index.html"))
.service(mt_form)
.service(health_form)
.service(parent_form)
@ -90,8 +87,9 @@ async fn main() -> std::io::Result<()> {
.service(church_form)
.service(local_form)
.service(camp_form)
.service(Files::new("/", "./public").index_file("index.html"))
})
.bind(("127.0.0.1", 4242))?
.bind(("localhost", 4242))?
.workers(2)
.run()
.await