use actix_web::{ web, App, HttpResponse, HttpServer};
async fn health() -> HttpResponse {
HttpResponse::Ok().finish()
}
#[actix_web::main]
async fn main() -> std::io::Result<()> {
println!("=== Rust UCenter ===");
let app = HttpServer::new(move || {
App::new()
.service(web::resource("/health").to(health))
})
.workers(10)
.bind("127.0.0.1:8080")?;
app.run().await
}