Slide 27
Slide 27 text
これだけで動く!actix-web
use actix_web::{get, App, HttpServer, Responder};
#[get("/index.html")]
async fn index() -> impl Responder {
"HELLO WORLD"
}
#[actix_web::main]
async fn main() -> std::io::Result<()> {
HttpServer::new(|| App::new().service(index))
.bind(("127.0.0.1", 8080))?
.run()
.await
}