1
0
mirror of https://github.com/actix/actix-website synced 2024-12-01 03:24:36 +01:00
actix-website/content/docs/http_server_init.md
2020-09-12 16:21:54 +01:00

460 B

title menu weight
HTTP Server Initialization docs_architecture 1020

Architecture overview

Below is a diagram of HttpServer initialization, which happens on the following code

#[actix_web::main]
async fn main() -> std::io::Result<()> {
    HttpServer::new(|| {
        App::new()
            .route("/", web::to(|| HttpResponse::Ok()))
    })
    .bind("127.0.0.1:8080")?
    .run()
    .await
}