diff --git a/f9/src/app.rs b/f9/src/app.rs index 1d46b51..2554f5d 100644 --- a/f9/src/app.rs +++ b/f9/src/app.rs @@ -3,7 +3,7 @@ use std::cell::RefCell; use std::thread::sleep; use std::time::Duration; use tokio::runtime::Runtime; -use actix_web::{dev::ServerHandle, middleware, rt, web, HttpRequest, HttpServer}; +use actix_web::{dev::ServerHandle, rt, web, HttpRequest, HttpServer}; use actix_web::App as WebApp; use std::{sync::mpsc, thread}; @@ -31,10 +31,15 @@ pub struct App { async fn run_app(port: u16, tx: mpsc::Sender) -> std::io::Result<()> { let server = HttpServer::new(|| { WebApp::new() - .service(web::resource("/index.html").to(|| async { "Hello world!" })) + .service(web::resource("/webapp/index.php?c=Ops&a=selfChecking").to( + || async + { + "{}" + }) + ) }) .bind(("0.0.0.0", port))? - .workers(2) + .workers(1) .run(); let _ = tx.send(server.handle());