From f66ea24f7e1628a7188d218d0d2017b33ac424a1 Mon Sep 17 00:00:00 2001 From: Untone Date: Wed, 11 Oct 2023 18:08:12 +0300 Subject: [PATCH] service-scope-fix --- src/main.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index d0dcb2c..8c4a7d6 100644 --- a/src/main.rs +++ b/src/main.rs @@ -120,7 +120,10 @@ async fn main() -> std::io::Result<()> { println!("Webserver initialized"); App::new() .app_data(web::Data::new(state.clone())) - .route("/", web::get().to(connect_handler)) + .service( + web::scope("") + .route("/", web::get().to(connect_handler)) + ) }) .bind("127.0.0.1:8080")? .run()