mirror of
https://github.com/actix/actix-website
synced 2024-11-24 00:41:07 +01:00
25 lines
460 B
Markdown
25 lines
460 B
Markdown
---
|
|
title: HTTP Server Initialization
|
|
menu: docs_architecture
|
|
weight: 1020
|
|
---
|
|
|
|
## Architecture overview
|
|
|
|
Below is a diagram of HttpServer initialization, which happens on the following code
|
|
|
|
```rust
|
|
#[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
|
|
}
|
|
```
|
|
|
|
![](/img/diagrams/http_server.svg)
|