rust-ucenter 0.1.2

rust-ucenter
Documentation
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 ===");

    
    // Start the web application.
    // We'll need to transfer ownership of the AppState to the HttpServer via the `move`.
    // Then we can instantiate our controllers.
    let app = HttpServer::new(move || {
    

        App::new()
            .service(web::resource("/health").to(health))
            
    })
    .workers(10)
    .bind("127.0.0.1:8080")?;

    app.run().await
}