mirror of
https://github.com/actix/actix-website
synced 2025-06-27 15:39:02 +02:00
@ -10,6 +10,15 @@ fn index2() -> impl Responder {
|
||||
}
|
||||
// </setup>
|
||||
|
||||
// <alternative>
|
||||
use actix_web::get;
|
||||
|
||||
#[get("/alternative")]
|
||||
fn index3() -> impl Responder {
|
||||
HttpResponse::Ok().body("Sweet syntax!")
|
||||
}
|
||||
// </alternative>
|
||||
|
||||
// <main>
|
||||
fn main() {
|
||||
HttpServer::new(|| {
|
||||
|
Reference in New Issue
Block a user