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

Function main

json/json-validation/src/main.rs:77–90  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

75
76#[actix_web::main]
77async fn main() -> io::Result<()> {
78 env_logger::init_from_env(env_logger::Env::new().default_filter_or("info"));
79
80 log::info!("starting HTTP server at http://localhost:8080");
81
82 HttpServer::new(|| {
83 App::new()
84 .app_data(web::Data::new(Client::default()))
85 .service(web::resource("/").route(web::post().to(create_something)))
86 })
87 .bind(("127.0.0.1", 8080))?
88 .run()
89 .await
90}

Callers

nothing calls this directly

Calls 2

postFunction · 0.85
runMethod · 0.80

Tested by

no test coverage detected