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:
@ -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())),
|
||||
);
|
||||
|
Reference in New Issue
Block a user