mirror of
https://github.com/actix/examples
synced 2025-06-28 09:50:36 +02:00
Update to master (#90)
This commit is contained in:
@ -7,7 +7,7 @@ workspace = ".."
|
||||
|
||||
[dependencies]
|
||||
actix-rt = "0.2"
|
||||
actix-web = { git="https://github.com/actix/actix-web.git", branch = "1.0" }
|
||||
actix-web = { git="https://github.com/actix/actix-web.git" }
|
||||
|
||||
dotenv = "0.10"
|
||||
env_logger = "0.5"
|
||||
|
@ -78,8 +78,8 @@ fn main() -> io::Result<()> {
|
||||
// Start http server
|
||||
HttpServer::new(move || {
|
||||
App::new()
|
||||
.state(pool.clone())
|
||||
.middleware(middleware::Logger::default())
|
||||
.data(pool.clone())
|
||||
.wrap(middleware::Logger::default())
|
||||
.service(
|
||||
web::resource("/asyncio_weather")
|
||||
.route(web::get().to_async(asyncio_weather)),
|
||||
|
Reference in New Issue
Block a user