mirror of
https://github.com/actix/examples
synced 2024-11-23 14:31:07 +01:00
upgrade to alpha3
This commit is contained in:
parent
fbb3dd2c40
commit
86e0f3e02c
@ -7,7 +7,7 @@ workspace = ".."
|
||||
|
||||
[dependencies]
|
||||
actix = "0.8.0-alpha.2"
|
||||
actix-web = "1.0.0-alpha.2"
|
||||
actix-web = "1.0.0-alpha.3"
|
||||
actix-redis = { git="https://github.com/actix/actix-redis.git" }
|
||||
futures = "0.1.23"
|
||||
redis-async = "0.4.0"
|
||||
|
@ -6,9 +6,9 @@ workspace = ".."
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
actix-web = "1.0.0-alpha.2"
|
||||
actix-files = "0.1.0-alpha.1"
|
||||
actix-session = "0.1.0-alpha.2"
|
||||
actix-web = "1.0.0-alpha.3"
|
||||
actix-files = "0.1.0-alpha.2"
|
||||
actix-session = "0.1.0-alpha.3"
|
||||
dotenv = "0.13.0"
|
||||
env_logger = "0.5.10"
|
||||
futures = "0.1.22"
|
||||
|
@ -7,7 +7,7 @@ workspace = ".."
|
||||
|
||||
[dependencies]
|
||||
actix-rt = "0.2"
|
||||
actix-web = "1.0.0-alpha.2"
|
||||
actix-web = "1.0.0-alpha.3"
|
||||
|
||||
dotenv = "0.10"
|
||||
env_logger = "0.5"
|
||||
|
@ -7,7 +7,7 @@ workspace = ".."
|
||||
|
||||
[dependencies]
|
||||
actix-rt = "0.2"
|
||||
actix-web = { version="1.0.0-alpha.2", features=["ssl"] }
|
||||
actix-web = { version="1.0.0-alpha.3", features=["ssl"] }
|
||||
|
||||
futures = "0.1"
|
||||
serde = "1.0.43"
|
||||
|
@ -7,9 +7,9 @@ edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
actix-rt = "0.2"
|
||||
actix-web = "1.0.0-alpha.2"
|
||||
actix-files = "0.1.0-alpha.1"
|
||||
actix-session = "0.1.0-alpha.2"
|
||||
actix-web = "1.0.0-alpha.3"
|
||||
actix-files = "0.1.0-alpha.2"
|
||||
actix-session = "0.1.0-alpha.3"
|
||||
|
||||
futures = "0.1.25"
|
||||
env_logger = "0.5"
|
||||
|
@ -6,5 +6,5 @@ edition = "2018"
|
||||
workspace = ".."
|
||||
|
||||
[dependencies]
|
||||
actix-web = "1.0.0-alpha.2"
|
||||
actix-web = "1.0.0-alpha.3"
|
||||
env_logger = "0.6"
|
||||
|
@ -6,8 +6,8 @@ workspace = ".."
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
actix-web = "1.0.0-alpha.2"
|
||||
actix-session = "0.1.0-alpha.2"
|
||||
actix-web = "1.0.0-alpha.3"
|
||||
actix-session = "0.1.0-alpha.3"
|
||||
|
||||
futures = "0.1"
|
||||
time = "0.1"
|
||||
|
@ -6,7 +6,7 @@ workspace = ".."
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
actix-web = "1.0.0-alpha.2"
|
||||
actix-web = "1.0.0-alpha.3"
|
||||
|
||||
bytes = "0.4"
|
||||
env_logger = "0.6"
|
||||
|
@ -6,7 +6,7 @@ edition = "2018"
|
||||
workspace = ".."
|
||||
|
||||
[dependencies]
|
||||
actix-web = "1.0.0-alpha.2"
|
||||
actix-web = "1.0.0-alpha.3"
|
||||
|
||||
derive_more = "0.14.0"
|
||||
futures = "0.1.23"
|
||||
|
@ -6,7 +6,7 @@ edition = "2018"
|
||||
workspace = ".."
|
||||
|
||||
[dependencies]
|
||||
actix-web = "1.0.0-alpha.2"
|
||||
actix-web = "1.0.0-alpha.3"
|
||||
|
||||
serde = "1.0"
|
||||
serde_derive = "1.0"
|
||||
|
@ -6,5 +6,5 @@ workspace = ".."
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
actix-web = "1.0.0-alpha.2"
|
||||
actix-web = "1.0.0-alpha.3"
|
||||
env_logger = "0.6"
|
||||
|
@ -7,7 +7,7 @@ edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
actix-rt = "0.2"
|
||||
actix-web = "1.0.0-alpha.2"
|
||||
actix-web = "1.0.0-alpha.3"
|
||||
|
||||
clap = "2.32.0"
|
||||
futures = "0.1.25"
|
||||
|
@ -16,7 +16,7 @@ fn forward(
|
||||
new_url.set_query(req.uri().query());
|
||||
|
||||
let forwarded_req = client
|
||||
.request_from(new_url.as_str(), &req)
|
||||
.request_from(new_url.as_str(), req.head())
|
||||
.no_default_headers();
|
||||
|
||||
// if let Some(addr) = req.peer_addr() {
|
||||
|
@ -15,7 +15,7 @@ path = "src/server.rs"
|
||||
|
||||
[dependencies]
|
||||
actix-rt = "0.2"
|
||||
actix-web = "1.0.0-alpha.2"
|
||||
actix-web = "1.0.0-alpha.3"
|
||||
|
||||
env_logger = "0.5"
|
||||
futures = "0.1"
|
||||
|
@ -8,7 +8,7 @@ fn index(client: web::Data<Client>) -> impl Future<Item = HttpResponse, Error =
|
||||
.get("http://127.0.0.1:8081/")
|
||||
.send()
|
||||
.map_err(Error::from) // <- convert SendRequestError to an Error
|
||||
.and_then(|resp| {
|
||||
.and_then(|mut resp| {
|
||||
resp.body() // <- this is MessageBody type, resolves to complete body
|
||||
.from_err() // <- convert PayloadError to an Error
|
||||
.and_then(|body| {
|
||||
|
@ -6,7 +6,7 @@ workspace = ".."
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
actix-web = "1.0.0-alpha.2"
|
||||
actix-web = "1.0.0-alpha.3"
|
||||
|
||||
bytes = "0.4"
|
||||
futures = "0.1"
|
||||
|
@ -6,7 +6,7 @@ workspace = ".."
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
actix-web = "1.0.0-alpha.2"
|
||||
actix-web = "1.0.0-alpha.3"
|
||||
env_logger = "0.6"
|
||||
futures = "0.1"
|
||||
serde = "1.0"
|
||||
|
@ -7,6 +7,6 @@ workspace = ".."
|
||||
|
||||
[dependencies]
|
||||
actix-service = "0.3.3"
|
||||
actix-web = "1.0.0-alpha.2"
|
||||
actix-web = "1.0.0-alpha.3"
|
||||
futures = "0.1.25"
|
||||
env_logger = "0.6"
|
@ -10,7 +10,7 @@ name = "multipart"
|
||||
path = "src/main.rs"
|
||||
|
||||
[dependencies]
|
||||
actix-web = "1.0.0-alpha.2"
|
||||
actix-web = "1.0.0-alpha.3"
|
||||
|
||||
env_logger = "0.6"
|
||||
futures = "0.1.25"
|
||||
|
@ -19,6 +19,7 @@ pub fn save_file(field: web::MultipartField) -> impl Future<Item = i64, Error =
|
||||
Either::B(
|
||||
field
|
||||
.fold(0i64, move |acc, bytes| {
|
||||
println!("CHUNK: {:?}", bytes.len());
|
||||
file.write_all(bytes.as_ref())
|
||||
.map(|_| acc + bytes.len() as i64)
|
||||
.map_err(|e| {
|
||||
|
@ -13,4 +13,4 @@ derive_more = "0.14"
|
||||
prost = "0.2.0"
|
||||
prost-derive = "0.2.0"
|
||||
|
||||
actix-web = "1.0.0-alpha.2"
|
||||
actix-web = "1.0.0-alpha.3"
|
||||
|
@ -7,7 +7,7 @@ workspace = ".."
|
||||
|
||||
[dependencies]
|
||||
actix-rt = "0.2"
|
||||
actix-web = "1.0.0-alpha.2"
|
||||
actix-web = "1.0.0-alpha.3"
|
||||
|
||||
futures = "0.1"
|
||||
env_logger = "0.6"
|
||||
|
@ -7,7 +7,7 @@ edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
actix = "0.8.0-alpha.2"
|
||||
actix-web = "1.0.0-alpha.2"
|
||||
actix-session = "0.1.0-alpha.2"
|
||||
actix-web = "1.0.0-alpha.3"
|
||||
actix-session = "0.1.0-alpha.3"
|
||||
actix-redis = { git = "https://github.com/actix/actix-redis.git", features = ["web"] }
|
||||
env_logger = "0.6"
|
||||
|
@ -12,5 +12,5 @@ path = "src/main.rs"
|
||||
[dependencies]
|
||||
env_logger = "0.5"
|
||||
rustls = "0.15"
|
||||
actix-web = { version = "1.0.0-alpha.2", features=["rust-tls"] }
|
||||
actix-files = "0.1.0-alpha.1"
|
||||
actix-web = { version = "1.0.0-alpha.3", features=["rust-tls"] }
|
||||
actix-files = "0.1.0-alpha.2"
|
||||
|
@ -8,8 +8,8 @@ workspace = ".."
|
||||
[dependencies]
|
||||
actix = { version = "0.8.0-alpha.2", features = ["http"] }
|
||||
actix-rt = "0.2.2"
|
||||
actix-web = "1.0.0-alpha.2"
|
||||
actix-files = "0.1.0-alpha.1"
|
||||
actix-web = "1.0.0-alpha.3"
|
||||
actix-files = "0.1.0-alpha.2"
|
||||
|
||||
bcrypt = "0.2.1"
|
||||
chrono = { version = "0.4.6", features = ["serde"] }
|
||||
|
@ -6,6 +6,6 @@ workspace = ".."
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
actix-web = "1.0.0-alpha.2"
|
||||
actix-web = "1.0.0-alpha.3"
|
||||
futures = "0.1.25"
|
||||
env_logger = "0.6"
|
||||
|
@ -9,5 +9,5 @@ edition = "2018"
|
||||
futures = "0.1"
|
||||
env_logger = "0.5"
|
||||
|
||||
actix-web = "1.0.0-alpha.2"
|
||||
actix-files = "0.1.0-alpha.1"
|
||||
actix-web = "1.0.0-alpha.3"
|
||||
actix-files = "0.1.0-alpha.2"
|
||||
|
@ -7,7 +7,7 @@ edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
#askama = { version = "0.8", features = ["with-actix-web"] }
|
||||
actix-web = "1.0.0-alpha.2"
|
||||
actix-web = "1.0.0-alpha.3"
|
||||
env_logger = "0.6"
|
||||
askama = "0.8"
|
||||
|
||||
|
@ -1,5 +0,0 @@
|
||||
extern crate askama;
|
||||
|
||||
fn main() {
|
||||
askama::rerun_if_templates_changed();
|
||||
}
|
@ -8,4 +8,4 @@ edition = "2018"
|
||||
[dependencies]
|
||||
env_logger = "0.6"
|
||||
tera = "0.11"
|
||||
actix-web = "1.0.0-alpha.2"
|
||||
actix-web = "1.0.0-alpha.3"
|
||||
|
@ -12,12 +12,12 @@ env_logger = "0.6"
|
||||
|
||||
yarte = { version = "0.2", features=["with-actix-web"] }
|
||||
|
||||
actix-web = "1.0.0-alpha"
|
||||
actix-web = "1.0.0-alpha.3"
|
||||
|
||||
[build-dependencies]
|
||||
yarte = { version = "0.2", features=["with-actix-web"] }
|
||||
|
||||
[dev-dependencies]
|
||||
bytes = "0.4"
|
||||
actix-http-test = "0.1.0-alpha"
|
||||
actix-http = "0.1.0-alpha"
|
||||
actix-http-test = "0.1.0-alpha.3"
|
||||
actix-http = "0.1.0-alpha.3"
|
||||
|
@ -11,6 +11,6 @@ path = "src/main.rs"
|
||||
|
||||
[dependencies]
|
||||
actix-rt = "0.2"
|
||||
actix-web = { version="1.0.0-alpha.2", features=["ssl"] }
|
||||
actix-web = { version="1.0.0-alpha.3", features=["ssl"] }
|
||||
env_logger = "0.6"
|
||||
openssl = { version="0.10" }
|
||||
|
@ -6,7 +6,7 @@ workspace = "../../"
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
actix-web = "1.0.0-alpha.2"
|
||||
actix-web = "1.0.0-alpha.3"
|
||||
serde = "1.0"
|
||||
serde_derive = "1.0"
|
||||
serde_json = "1.0"
|
||||
|
@ -11,9 +11,9 @@ path = "src/main.rs"
|
||||
|
||||
[dependencies]
|
||||
actix = "0.8.0-alpha.2"
|
||||
actix-web = "1.0.0-alpha.2"
|
||||
actix-web-actors = "1.0.0-alpha.2"
|
||||
actix-files = "0.1.0-alpha.1"
|
||||
actix-web = "1.0.0-alpha.3"
|
||||
actix-web-actors = "1.0.0-alpha.3"
|
||||
actix-files = "0.1.0-alpha.2"
|
||||
|
||||
rand = "0.6"
|
||||
bytes = "0.4"
|
||||
|
@ -15,9 +15,9 @@ path = "src/client.rs"
|
||||
|
||||
[dependencies]
|
||||
actix = "0.8.0-alpha.2"
|
||||
actix-web = "1.0.0-alpha.2"
|
||||
actix-web-actors = "1.0.0-alpha.2"
|
||||
actix-files = "0.1.0-alpha.1"
|
||||
actix-web = "1.0.0-alpha.3"
|
||||
actix-web-actors = "1.0.0-alpha.3"
|
||||
actix-files = "0.1.0-alpha.2"
|
||||
|
||||
rand = "0.6"
|
||||
bytes = "0.4"
|
||||
|
@ -15,9 +15,9 @@ path = "src/main.rs"
|
||||
|
||||
[dependencies]
|
||||
actix = "0.8.0-alpha.2"
|
||||
actix-web = "1.0.0-alpha.2"
|
||||
actix-web-actors = "1.0.0-alpha.2"
|
||||
actix-files = "0.1.0-alpha.1"
|
||||
actix-web = "1.0.0-alpha.3"
|
||||
actix-web-actors = "1.0.0-alpha.3"
|
||||
actix-files = "0.1.0-alpha.2"
|
||||
env_logger = "0.6"
|
||||
futures = "0.1"
|
||||
bytes = "0.4"
|
Loading…
Reference in New Issue
Block a user