Skip to content

Commit

Permalink
Nesting at the root is no longer supported
Browse files Browse the repository at this point in the history
  • Loading branch information
tarkah committed Jan 5, 2025
1 parent ebbfb32 commit 612be5b
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions crates/service/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,14 +137,11 @@ impl Server<'_> {
}
}

let app = axum::Router::new()
.nest("/", self.router)
.layer(self.extract_token)
.layer(middleware::Log);
let listener = tokio::net::TcpListener::bind(addr).await?;
let router = self.router.layer(self.extract_token).layer(middleware::Log);

self.runner
.with_task("http server", axum::serve(listener, app))
.with_task("http server", axum::serve(listener, router))
.with_task("signal capture", signal::capture(self.signals))
.run()
.await;
Expand Down

0 comments on commit 612be5b

Please sign in to comment.