use actix_web::{App, get, HttpResponse, HttpServer, Responder}; #[actix_web::main] async fn main() -> std::io::Result<()> { HttpServer::new(|| App::new().service(hello)) .bind(("127.0.0.1", 8000))? .run() .await } #[get("/")] async fn hello() -> impl Responder { HttpResponse::Ok().body("Hello World!") }