1
0
mirror of https://github.com/actix/actix-website synced 2025-06-27 15:39:02 +02:00

First pass at url-dispatch chapter.

This commit is contained in:
Cameron Dershem
2019-06-17 04:12:11 -04:00
parent 35156b0a75
commit 71e6f076a4
8 changed files with 54 additions and 57 deletions

View File

@ -7,7 +7,7 @@ fn index(_req: HttpRequest) -> HttpResponse {
fn main() {
App::new()
.service(web::resource("/prefix").route(web::get().to(index)))
.service(web::resource("/prefix").to(index))
.service(
web::resource("/user/{name}").route(web::get().to(|| HttpResponse::Ok())),
);