mirror of
https://github.com/actix/actix-website
synced 2025-06-27 07:29:02 +02:00
remove references to .data()
This commit is contained in:
@ -36,7 +36,7 @@ async fn main() -> io::Result<()> {
|
||||
|
||||
// Start HTTP server
|
||||
HttpServer::new(move || {
|
||||
App::new().data(pool.clone())
|
||||
App::new().app_data(web::Data::new(pool.clone()))
|
||||
.resource("/{name}", web::get().to(index))
|
||||
})
|
||||
.bind(("127.0.0.1", 8080))?
|
||||
|
Reference in New Issue
Block a user