1
0
mirror of https://github.com/actix/examples synced 2024-11-27 16:02:57 +01:00

upgrade to beta3

This commit is contained in:
Nikolay Kim 2019-05-04 21:52:24 -07:00
parent d571ee5abb
commit 8de183768c
33 changed files with 70 additions and 80 deletions

View File

@ -6,8 +6,8 @@ edition = "2018"
workspace = ".."
[dependencies]
actix = "0.8.0-alpha.2"
actix-web = "1.0.0-alpha.4"
actix = "0.8.1"
actix-web = "1.0.0-beta.3"
actix-redis = { git="https://github.com/actix/actix-redis.git" }
futures = "0.1.23"
redis-async = "0.4.0"

View File

@ -6,9 +6,9 @@ workspace = ".."
edition = "2018"
[dependencies]
actix-web = "1.0.0-alpha.4"
actix-files = "0.1.0-alpha.4"
actix-session = "0.1.0-alpha.4"
actix-web = "1.0.0-beta.3"
actix-files = "0.1.0-beta.1"
actix-session = "0.1.0-beta.2"
dotenv = "0.13.0"
env_logger = "0.5.10"
futures = "0.1.22"

View File

@ -7,7 +7,7 @@ workspace = ".."
[dependencies]
actix-rt = "0.2"
actix-web = "1.0.0-alpha.4"
actix-web = "1.0.0-beta.3"
dotenv = "0.10"
env_logger = "0.5"

View File

@ -7,9 +7,9 @@ edition = "2018"
[dependencies]
actix-rt = "0.2"
actix-web = "1.0.0-alpha.4"
actix-files = "0.1.0-alpha.4"
actix-session = "0.1.0-alpha.4"
actix-web = "1.0.0-beta.3"
actix-files = "0.1.0-beta.1"
actix-session = "0.1.0-beta.2"
futures = "0.1.25"
env_logger = "0.5"

View File

@ -6,5 +6,5 @@ edition = "2018"
workspace = ".."
[dependencies]
actix-web = "1.0.0-alpha.4"
actix-web = "1.0.0-beta.3"
env_logger = "0.6"

View File

@ -6,8 +6,8 @@ workspace = ".."
edition = "2018"
[dependencies]
actix-web = "1.0.0-alpha.4"
actix-session = "0.1.0-alpha.4"
actix-web = "1.0.0-beta.3"
actix-session = "0.1.0-beta.2"
futures = "0.1"
time = "0.1"

View File

@ -6,7 +6,7 @@ workspace = ".."
edition = "2018"
[dependencies]
actix-web = "1.0.0-alpha.4"
actix-web = "1.0.0-beta.3"
bytes = "0.4"
env_logger = "0.6"

View File

@ -137,8 +137,7 @@ fn main() -> std::io::Result<()> {
// Use of the extractors makes some post conditions simpler such
// as size limit protections and built in json validation.
.service(
web::resource("/add2").route(
web::post()
web::resource("/add2")
.data(
web::JsonConfig::default()
.limit(4096) // <- limit size of the payload
@ -151,8 +150,7 @@ fn main() -> std::io::Result<()> {
.into()
}),
)
.to_async(add2),
),
.route(web::post().to_async(add2)),
)
// Manual parsing would allow custom error construction, use of
// other parsers *beside* json (for example CBOR, protobuf, xml), and allows

View File

@ -6,7 +6,7 @@ edition = "2018"
workspace = ".."
[dependencies]
actix-web = "1.0.0-alpha.4"
actix-web = "1.0.0-beta.3"
derive_more = "0.14.0"
futures = "0.1.23"

View File

@ -6,7 +6,7 @@ edition = "2018"
workspace = ".."
[dependencies]
actix-web = "1.0.0-alpha.4"
actix-web = "1.0.0-beta.3"
serde = "1.0"
serde_derive = "1.0"

View File

@ -6,5 +6,5 @@ workspace = ".."
edition = "2018"
[dependencies]
actix-web = "1.0.0-alpha.4"
actix-web = "1.0.0-beta.3"
env_logger = "0.6"

View File

@ -7,7 +7,7 @@ edition = "2018"
[dependencies]
actix-rt = "0.2"
actix-web = "1.0.0-alpha.5"
actix-web = "1.0.0-beta.3"
clap = "2.32.0"
futures = "0.1.25"

View File

@ -15,7 +15,7 @@ path = "src/server.rs"
[dependencies]
actix-rt = "0.2"
actix-web = "1.0.0-alpha.4"
actix-web = "1.0.0-beta.3"
env_logger = "0.5"
futures = "0.1"

View File

@ -6,7 +6,7 @@ workspace = ".."
edition = "2018"
[dependencies]
actix-web = "1.0.0-alpha.4"
actix-web = "1.0.0-beta.3"
bytes = "0.4"
futures = "0.1"

View File

@ -83,19 +83,12 @@ fn main() -> std::io::Result<()> {
App::new()
// enable logger
.wrap(middleware::Logger::default())
.data(web::JsonConfig::default().limit(4096)) // <- limit size of the payload (global configuration)
.service(web::resource("/extractor").route(web::post().to(index)))
.service(
web::resource("/extractor").route(
web::post()
.data(web::JsonConfig::default().limit(4096)) // <- limit size of the payload
.to(index),
),
)
.service(
web::resource("/extractor2").route(
web::post()
.data(web::JsonConfig::default().limit(4096)) // <- limit size of the payload
.to_async(extract_item),
),
web::resource("/extractor2")
.data(web::JsonConfig::default().limit(1024)) // <- limit size of the payload (resource level)
.route(web::post().to_async(extract_item)),
)
.service(web::resource("/manual").route(web::post().to_async(index_manual)))
.service(

View File

@ -6,8 +6,8 @@ edition = "2018"
workspace = ".."
[dependencies]
actix = "0.8.0-alpha.2"
actix-web = "1.0.0-alpha.4"
actix = "0.8.1"
actix-web = "1.0.0-beta.3"
env_logger = "0.6"
futures = "0.1.23"
futures-timer = "0.1"

View File

@ -6,7 +6,7 @@ workspace = ".."
edition = "2018"
[dependencies]
actix-web = "1.0.0-alpha.4"
actix-web = "1.0.0-beta.3"
env_logger = "0.6"
futures = "0.1"
serde = "1.0"

View File

@ -7,6 +7,6 @@ workspace = ".."
[dependencies]
actix-service = "0.3.6"
actix-web = "1.0.0-alpha.4"
actix-web = "1.0.0-beta.3"
futures = "0.1.25"
env_logger = "0.6"

View File

@ -10,7 +10,7 @@ name = "multipart"
path = "src/main.rs"
[dependencies]
actix-web = "1.0.0-beta.1"
actix-web = "1.0.0-beta.3"
actix-multipart = "0.1.0-beta.1"
env_logger = "0.6"

View File

@ -23,8 +23,7 @@ pub fn save_file(field: Field) -> impl Future<Item = i64, Error = Error> {
// fs operations are blocking, we have to execute writes
// on threadpool
web::block(move || {
file.write_all(bytes.as_ref())
.map_err(|e| {
file.write_all(bytes.as_ref()).map_err(|e| {
println!("file.write_all failed: {:?}", e);
MultipartError::Payload(error::PayloadError::Io(e))
})?;

View File

@ -13,4 +13,4 @@ derive_more = "0.14"
prost = "0.2.0"
prost-derive = "0.2.0"
actix-web = "1.0.0-alpha.4"
actix-web = "1.0.0-beta.3"

View File

@ -7,7 +7,7 @@ workspace = ".."
[dependencies]
actix-rt = "0.2"
actix-web = "1.0.0-alpha.4"
actix-web = "1.0.0-beta.3"
futures = "0.1"
env_logger = "0.6"

View File

@ -6,8 +6,8 @@ workspace = ".."
edition = "2018"
[dependencies]
actix = "0.8.0-alpha.2"
actix-web = "1.0.0-alpha.4"
actix-session = "0.1.0-alpha.4"
actix = "0.8.1"
actix-web = "1.0.0-beta.3"
actix-session = "0.1.0-beta.2"
actix-redis = { git = "https://github.com/actix/actix-redis.git", features = ["web"] }
env_logger = "0.6"

View File

@ -8,7 +8,7 @@ workspace = ".."
[dependencies]
actix = { version = "0.8.1", features = ["http"] }
actix-rt = "0.2.2"
actix-web = "1.0.0-beta.1"
actix-web = "1.0.0-beta.3"
actix-files = "0.1.0-beta.1"
bcrypt = "0.2.1"

View File

@ -6,6 +6,6 @@ workspace = ".."
edition = "2018"
[dependencies]
actix-web = "1.0.0-alpha.4"
actix-web = "1.0.0-beta.3"
futures = "0.1.25"
env_logger = "0.6"

View File

@ -9,5 +9,5 @@ edition = "2018"
futures = "0.1"
env_logger = "0.5"
actix-web = "1.0.0-alpha.4"
actix-files = "0.1.0-alpha.4"
actix-web = "1.0.0-beta.3"
actix-files = "0.1.0-beta.1"

View File

@ -6,7 +6,7 @@ workspace = ".."
edition = "2018"
[dependencies]
actix-web = "1.0.0-alpha.4"
actix-web = "1.0.0-beta.3"
env_logger = "0.6"
askama = "0.8"

View File

@ -8,4 +8,4 @@ edition = "2018"
[dependencies]
env_logger = "0.6"
tera = "0.11"
actix-web = "1.0.0-alpha.4"
actix-web = "1.0.0-beta.3"

View File

@ -12,7 +12,7 @@ env_logger = "0.6"
yarte = { version = "0.2", features=["with-actix-web"] }
actix-web = "1.0.0-alpha.4"
actix-web = "1.0.0-beta.3"
[build-dependencies]
yarte = { version = "0.2", features=["with-actix-web"] }

View File

@ -6,7 +6,7 @@ workspace = "../../"
edition = "2018"
[dependencies]
actix-web = "1.0.0-alpha.4"
actix-web = "1.0.0-beta.3"
serde = "1.0"
serde_derive = "1.0"
serde_json = "1.0"

View File

@ -10,10 +10,10 @@ name = "websocket-chat-server"
path = "src/main.rs"
[dependencies]
actix = "0.8.0-alpha.2"
actix-web = "1.0.0-alpha.4"
actix-web-actors = "1.0.0-alpha.2"
actix-files = "0.1.0-alpha.4"
actix = "0.8.1"
actix-web = "1.0.0-beta.3"
actix-web-actors = "1.0.0-alpha.3"
actix-files = "0.1.0-beta.1"
rand = "0.6"
bytes = "0.4"

View File

@ -14,10 +14,10 @@ name = "websocket-tcp-client"
path = "src/client.rs"
[dependencies]
actix = "0.8.0-alpha.2"
actix-web = "1.0.0-alpha.4"
actix = "0.8.1"
actix-web = "1.0.0-beta.3"
actix-web-actors = "1.0.0-alpha.3"
actix-files = "0.1.0-alpha.4"
actix-files = "0.1.0-beta.1"
rand = "0.6"
bytes = "0.4"

View File

@ -14,10 +14,10 @@ path = "src/main.rs"
#path = "src/client.rs"
[dependencies]
actix = "0.8.0-alpha.2"
actix-web = "1.0.0-alpha.4"
actix = "0.8.1"
actix-web = "1.0.0-beta.3"
actix-web-actors = "1.0.0-alpha.3"
actix-files = "0.1.0-alpha.4"
actix-files = "0.1.0-beta.1"
env_logger = "0.6"
futures = "0.1"
bytes = "0.4"