This commit is contained in:
2023-10-11 23:03:12 +03:00
parent 5526ebe7c9
commit 9dff03fe1a
2 changed files with 9 additions and 8 deletions

View File

@@ -120,12 +120,9 @@ async fn main() -> std::io::Result<()> {
HttpServer::new(move || {
println!("Webserver initialized");
App::new()
.wrap(Logger::default()) // Added this line
.wrap(Logger::default())
.app_data(web::Data::new(state.clone()))
.service(
web::scope("")
.route("/", web::get().to(connect_handler))
)
.route("/", web::get().to(connect_handler))
})
.bind("127.0.0.1:8080")?
.run()