mirror of
https://github.com/actix/actix-website
synced 2025-02-25 13:32:49 +01:00
parent
a56649a687
commit
34ae647fd5
@ -28,7 +28,7 @@ async fn main() -> std::io::Result<()> {
|
|||||||
|
|
||||||
HttpServer::new(move || {
|
HttpServer::new(move || {
|
||||||
App::new()
|
App::new()
|
||||||
.app_data(data.clone())
|
.data(data.clone())
|
||||||
.route("/", web::to(show_count))
|
.route("/", web::to(show_count))
|
||||||
.route("/add", web::to(add_one))
|
.route("/add", web::to(add_one))
|
||||||
})
|
})
|
||||||
|
@ -29,7 +29,7 @@ async fn main() -> std::io::Result<()> {
|
|||||||
|
|
||||||
HttpServer::new(move || {
|
HttpServer::new(move || {
|
||||||
App::new()
|
App::new()
|
||||||
.app_data(data.clone())
|
.data(data.clone())
|
||||||
.route("/", web::to(show_count))
|
.route("/", web::to(show_count))
|
||||||
.route("/add", web::to(add_one))
|
.route("/add", web::to(add_one))
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user