mirror of
https://github.com/actix/actix-website
synced 2024-11-30 11:12:57 +01:00
ad4aeac34f
* Update file extensions and exports for TypeScript compatibility * docs: fix typo in getting-started.md * chore: add no-trailing-punctuation rule to VS Code settings * feat: add @docusaurus/theme-mermaid for mermaid diagram support * Update import paths for MermaidDiagram component * remove redudndant check, use effect only runs after the component is mounted * Update docusaurus.config.ts to fix syntax error * bring back check because it's not possible to properly cancel a dynamic import * feat: optimize dynamic import in CodeBlock component * chore: update VS Code extensions.json with eslint recommendation * Update docusaurus.config.ts to add GitHub repository link in header
637 B
637 B
title |
---|
HTTP Server Initialization |
import CodeBlock from "@site/src/components/code_block"; import MermaidDiagram from "@site/src/components/mermaid_diagram"; import http_server from '!!raw-loader!@site/static/img/diagrams/http_server.mmd';
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
}