1
0
mirror of https://github.com/actix/actix-website synced 2025-03-15 20:53:07 +01:00

20 lines
355 B
Rust
Raw Normal View History

// <setup>
2019-06-28 13:31:30 -04:00
use actix_web::{web, App, Responder};
2019-12-29 01:15:22 +09:00
async fn index() -> impl Responder {
"Hello world!"
}
2019-12-29 01:15:22 +09:00
#[actix_rt::main]
async fn main() {
2020-01-02 12:43:41 +06:00
HttpServer::new(|| {
App::new().service(
web::scope("/app").route("/index.html", web::get().to(index)),
)
})
.bind("127.0.0.1:8088")?
.run()
.await
}
// </setup>