mirror of
https://github.com/LukeMathWalker/zero-to-production.git
synced 2025-01-03 21:58:48 +00:00
Update to latest actix-web.
This commit is contained in:
parent
8c91b8c3da
commit
89fefdd7d4
3 changed files with 434 additions and 490 deletions
915
Cargo.lock
generated
915
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
|
@ -13,7 +13,10 @@ path = "src/main.rs"
|
|||
name = "zero2prod"
|
||||
|
||||
[dependencies]
|
||||
actix-web = "4.0.0-beta.3"
|
||||
actix-http = "=3.0.0-beta.5"
|
||||
actix-service = "=2.0.0-beta.5"
|
||||
actix-web = "=4.0.0-beta.5"
|
||||
|
||||
serde = "1.0.115"
|
||||
config = { version = "0.10.1", default-features = false, features = ["yaml"] }
|
||||
sqlx = { version = "0.5.1", default-features = false, features = [ "runtime-actix-rustls", "macros", "postgres", "uuid", "chrono", "migrate", "offline"] }
|
||||
|
@ -24,9 +27,9 @@ tracing-futures = "0.2.4"
|
|||
tracing-subscriber = { version = "0.2.12", features = ["registry", "env-filter"] }
|
||||
tracing-bunyan-formatter = "0.1.6"
|
||||
tracing-log = "0.1.1"
|
||||
tracing-actix-web = "0.3.0-beta.2"
|
||||
serde-aux = "1.0.1"
|
||||
unicode-segmentation = "1.7.1"
|
||||
tracing-actix-web = "0.4.0-beta.4"
|
||||
|
||||
[dev-dependencies]
|
||||
reqwest = { version = "0.11", features = ["json"] }
|
||||
|
|
|
@ -10,7 +10,7 @@ pub fn run(listener: TcpListener, db_pool: PgPool) -> Result<Server, std::io::Er
|
|||
let db_pool = Data::new(db_pool);
|
||||
let server = HttpServer::new(move || {
|
||||
App::new()
|
||||
.wrap(TracingLogger)
|
||||
.wrap(TracingLogger::default())
|
||||
.route("/health_check", web::get().to(health_check))
|
||||
.route("/subscriptions", web::post().to(subscribe))
|
||||
.app_data(db_pool.clone())
|
||||
|
|
Loading…
Reference in a new issue