diff --git a/layouts/index.html b/layouts/index.html
index 7856907..981c161 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -50,8 +50,8 @@
{{ highlight `use actix_web::{get, web, App, HttpServer, Responder};
-#[get("/{name}")]
-async fn greet_person(name: web::Path) -> impl Responder {
+#[get("/hello/{name}")]
+async fn greet(name: web::Path) -> impl Responder {
format!("Hello {name}!")
}
@@ -59,8 +59,8 @@ async fn greet_person(name: web::Path) -> impl Responder {
async fn main() -> std::io::Result<()> {
HttpServer::new(|| {
App::new()
- .route("/", web::get().to(|| async { "Hello World!" }))
- .service(greet_person)
+ .route("/hello", web::get().to(|| async { "Hello World!" }))
+ .service(greet)
})
.bind(("127.0.0.1", 8080))?
.run()