1
0
mirror of https://github.com/actix/actix-website synced 2025-07-03 01:54:32 +02:00
Files
actix-website/examples/application/src/app.rs

15 lines
289 B
Rust

// <setup>
use actix_web::{web, App, HttpRequest, Responder};
fn index(_req: HttpRequest) -> impl Responder {
"Hello world!"
}
#[rustfmt::skip]
pub fn main() {
App::new().service(
web::scope("/app")
.route("/index.html", web::get().to(index)));
}
// </setup>