MCPcopy Create free account
hub / github.com/actix/examples / main

Function main

json/json-error/src/main.rs:36–46  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

34
35#[actix_web::main]
36async fn main() -> io::Result<()> {
37 env_logger::init_from_env(env_logger::Env::new().default_filter_or("info"));
38
39 log::info!("starting HTTP server at http://localhost:8080");
40
41 HttpServer::new(|| App::new().service(web::resource("/").route(web::get().to(index))))
42 .workers(2)
43 .bind(("127.0.0.1", 8080))?
44 .run()
45 .await
46}

Callers

nothing calls this directly

Calls 1

runMethod · 0.80

Tested by

no test coverage detected