mirror of
https://github.com/actix/actix-website
synced 2025-03-15 04:33:07 +01:00
16 lines
285 B
Rust
16 lines
285 B
Rust
// <setup>
|
|
use actix_web::{web, App, Responder};
|
|
|
|
async fn index() -> impl Responder {
|
|
"Hello world!"
|
|
}
|
|
|
|
#[rustfmt::skip]
|
|
#[actix_rt::main]
|
|
async fn main() {
|
|
App::new().service(
|
|
web::scope("/app")
|
|
.route("/index.html", web::get().to(index)));
|
|
}
|
|
// </setup>
|