1
0
mirror of https://github.com/actix/examples synced 2024-11-23 14:31:07 +01:00

update deps

This commit is contained in:
Nikolay Kim 2019-12-25 20:48:33 +04:00
parent a0812c9b29
commit e8ab9ee7ca
76 changed files with 85 additions and 89 deletions

View File

@ -7,7 +7,7 @@ workspace = ".."
[dependencies] [dependencies]
actix-rt = "1.0.0" actix-rt = "1.0.0"
actix-web = "2.0.0-rc" actix-web = "2.0.0"
dotenv = "0.10" dotenv = "0.10"
env_logger = "0.6" env_logger = "0.6"

View File

@ -70,6 +70,6 @@ async fn main() -> io::Result<()> {
) )
}) })
.bind("127.0.0.1:8080")? .bind("127.0.0.1:8080")?
.start() .run()
.await .await
} }

View File

@ -7,7 +7,7 @@ workspace = ".."
[dependencies] [dependencies]
actix-rt = "1.0.0" actix-rt = "1.0.0"
actix-web = { version="2.0.0-rc", features=["openssl"] } actix-web = { version="2.0.0", features=["openssl"] }
futures = "0.3.1" futures = "0.3.1"
serde = "1.0.43" serde = "1.0.43"

View File

@ -95,6 +95,6 @@ async fn main() -> io::Result<()> {
.service(web::resource("/something").route(web::post().to(create_something))) .service(web::resource("/something").route(web::post().to(create_something)))
}) })
.bind(endpoint)? .bind(endpoint)?
.start() .run()
.await .await
} }

View File

@ -3,11 +3,10 @@ name = "async_ex2"
version = "0.1.0" version = "0.1.0"
authors = ["dowwie <dkcdkg@gmail.com>"] authors = ["dowwie <dkcdkg@gmail.com>"]
edition = "2018" edition = "2018"
workspace = ".."
[dependencies] [dependencies]
actix-rt = "1.0.0" actix-rt = "1.0.0"
actix-web = { version="2.0.0-rc", features=["openssl"] } actix-web = { version="2.0.0", features=["openssl"] }
actix-multipart = "0.2.0" actix-multipart = "0.2.0"
actix-service = "1.0.0" actix-service = "1.0.0"
bytes = "0.5.3" bytes = "0.5.3"

View File

@ -13,6 +13,6 @@ async fn main() -> std::io::Result<()> {
.wrap(middleware::Logger::default()) .wrap(middleware::Logger::default())
}) })
.bind("127.0.0.1:8080")? .bind("127.0.0.1:8080")?
.start() .run()
.await .await
} }

View File

@ -7,8 +7,8 @@ edition = "2018"
[dependencies] [dependencies]
actix-rt = "1.0.0" actix-rt = "1.0.0"
actix-web = "2.0.0-rc" actix-web = "2.0.0"
actix-files = "0.2.0" actix-files = "0.2.1"
actix-session = "0.3.0" actix-session = "0.3.0"
actix-utils = "1.0.3" actix-utils = "1.0.3"

View File

@ -123,6 +123,6 @@ async fn main() -> io::Result<()> {
) )
}) })
.bind("127.0.0.1:8080")? .bind("127.0.0.1:8080")?
.start() .run()
.await .await
} }

View File

@ -6,7 +6,7 @@ edition = "2018"
workspace = ".." workspace = ".."
[dependencies] [dependencies]
actix-web = "2.0.0-rc" actix-web = "2.0.0"
actix-identity = "0.2.0" actix-identity = "0.2.0"
actix-rt = "1.0.0" actix-rt = "1.0.0"
env_logger = "0.6" env_logger = "0.6"

View File

@ -38,6 +38,6 @@ async fn main() -> std::io::Result<()> {
.service(web::resource("/").route(web::get().to(index))) .service(web::resource("/").route(web::get().to(index)))
}) })
.bind("127.0.0.1:8080")? .bind("127.0.0.1:8080")?
.start() .run()
.await .await
} }

View File

@ -6,7 +6,7 @@ workspace = ".."
edition = "2018" edition = "2018"
[dependencies] [dependencies]
actix-web = "2.0.0-rc" actix-web = "2.0.0"
actix-session = "0.3.0" actix-session = "0.3.0"
actix-rt = "1.0.0" actix-rt = "1.0.0"

View File

@ -40,6 +40,6 @@ async fn main() -> std::io::Result<()> {
.service(web::resource("/").to(index)) .service(web::resource("/").to(index))
}) })
.bind("127.0.0.1:8080")? .bind("127.0.0.1:8080")?
.start() .run()
.await .await
} }

View File

@ -7,7 +7,7 @@ edition = "2018"
[dependencies] [dependencies]
actix-rt = "1.0.0" actix-rt = "1.0.0"
actix-web = "2.0.0-rc" actix-web = "2.0.0"
bytes = "0.4" bytes = "0.4"
env_logger = "0.6" env_logger = "0.6"

View File

@ -136,6 +136,6 @@ async fn main() -> std::io::Result<()> {
.service(web::resource("/add/{name}").route(web::get().to(add))) .service(web::resource("/add/{name}").route(web::get().to(add)))
}) })
.bind("127.0.0.1:8080")? .bind("127.0.0.1:8080")?
.start() .run()
.await .await
} }

View File

@ -6,7 +6,7 @@ edition = "2018"
workspace = ".." workspace = ".."
[dependencies] [dependencies]
actix-web = "2.0.0-rc" actix-web = "2.0.0"
actix-rt = "1.0.0" actix-rt = "1.0.0"
derive_more = "0.99.2" derive_more = "0.99.2"
futures = "0.3.1" futures = "0.3.1"

View File

@ -97,6 +97,6 @@ async fn main() -> std::io::Result<()> {
.service(web::resource("/something").route(web::get().to(do_something))) .service(web::resource("/something").route(web::get().to(do_something)))
}) })
.bind("127.0.0.1:8088")? .bind("127.0.0.1:8088")?
.start() .run()
.await .await
} }

View File

@ -6,7 +6,7 @@ edition = "2018"
workspace = ".." workspace = ".."
[dependencies] [dependencies]
actix-web = "2.0.0-rc" actix-web = "2.0.0"
actix-rt = "1.0.0" actix-rt = "1.0.0"
serde = "1.0" serde = "1.0"
serde_derive = "1.0" serde_derive = "1.0"

View File

@ -17,7 +17,7 @@ async fn main() -> std::io::Result<()> {
.configure(app_config) .configure(app_config)
}) })
.bind("127.0.0.1:8080")? .bind("127.0.0.1:8080")?
.start() .run()
.await .await
} }
@ -142,9 +142,7 @@ mod tests {
foo: "bar".to_string(), foo: "bar".to_string(),
}) })
.to_http_request(); .to_http_request();
let data = state let data = state.app_data::<actix_web::web::Data<AppState>>().unwrap();
.app_data::<actix_web::web::Data<AppState>>()
.unwrap();
let params = Form(MyParams { let params = Form(MyParams {
name: "John".to_string(), name: "John".to_string(),
}); });

View File

@ -7,7 +7,7 @@ edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies] [dependencies]
actix-web = "2.0.0-rc" actix-web = "2.0.0"
actix-rt = "1.0.0" actix-rt = "1.0.0"
futures = "0.3.1" futures = "0.3.1"

View File

@ -28,6 +28,6 @@ async fn main() -> std::io::Result<()> {
.default_service(web::to(|| async { "404" })) .default_service(web::to(|| async { "404" }))
}) })
.bind("127.0.0.1:8080")? .bind("127.0.0.1:8080")?
.start() .run()
.await .await
} }

View File

@ -5,6 +5,6 @@ authors = ["Nikolay Kim <fafhrd91@gmail.com>"]
edition = "2018" edition = "2018"
[dependencies] [dependencies]
actix-web = "2.0.0-rc" actix-web = "2.0.0"
actix-rt = "1.0.0" actix-rt = "1.0.0"
env_logger = "0.6" env_logger = "0.6"

View File

@ -18,7 +18,7 @@ async fn main() -> std::io::Result<()> {
.service(web::resource("/").to(index)) .service(web::resource("/").to(index))
}) })
.bind("127.0.0.1:8080")? .bind("127.0.0.1:8080")?
.start() .run()
.await .await
} }

View File

@ -2,12 +2,11 @@
name = "http-proxy" name = "http-proxy"
version = "2.0.0" version = "2.0.0"
authors = ["Nikolay Kim <fafhrd91@gmail.com>", "Rotem Yaari <vmalloc@gmail.com>"] authors = ["Nikolay Kim <fafhrd91@gmail.com>", "Rotem Yaari <vmalloc@gmail.com>"]
workspace = ".."
edition = "2018" edition = "2018"
[dependencies] [dependencies]
actix-rt = "1.0.0" actix-rt = "1.0.0"
actix-web = { version = "2.0.0-rc", features=["openssl"] } actix-web = { version = "2.0.0", features=["openssl"] }
clap = "2.32.0" clap = "2.32.0"
futures = "0.3.1" futures = "0.3.1"
failure = "0.1.3" failure = "0.1.3"

View File

@ -99,6 +99,6 @@ async fn main() -> std::io::Result<()> {
}) })
.bind((listen_addr, listen_port))? .bind((listen_addr, listen_port))?
.system_exit() .system_exit()
.start() .run()
.await .await
} }

View File

@ -6,7 +6,7 @@ workspace = ".."
edition = "2018" edition = "2018"
[dependencies] [dependencies]
actix-web = "2.0.0-rc" actix-web = "2.0.0"
actix-rt = "1.0.0" actix-rt = "1.0.0"
actix-service = "1.0.0" actix-service = "1.0.0"

View File

@ -80,7 +80,7 @@ async fn main() -> std::io::Result<()> {
.service(web::resource("/").route(web::post().to(index))) .service(web::resource("/").route(web::post().to(index)))
}) })
.bind("127.0.0.1:8080")? .bind("127.0.0.1:8080")?
.start() .run()
.await .await
} }

View File

@ -5,7 +5,7 @@ authors = ["Kai Yao <kai.b.yao@gmail.com>"]
edition = "2018" edition = "2018"
[dependencies] [dependencies]
actix-web = "2.0.0-rc" actix-web = "2.0.0"
actix-rt = "1.0.0" actix-rt = "1.0.0"
failure = "0.1" failure = "0.1"
futures = "0.3" futures = "0.3"

View File

@ -45,6 +45,6 @@ async fn main() -> io::Result<()> {
}) })
.bind(ip_address) .bind(ip_address)
.expect("Can not bind to port 8000") .expect("Can not bind to port 8000")
.start() .run()
.await .await
} }

View File

@ -6,7 +6,7 @@ edition = "2018"
workspace = ".." workspace = ".."
[dependencies] [dependencies]
actix-web = "2.0.0-rc" actix-web = "2.0.0"
actix-rt = "1.0.0" actix-rt = "1.0.0"
bytes = "0.5" bytes = "0.5"
env_logger = "0.6" env_logger = "0.6"

View File

@ -114,7 +114,7 @@ impl ImplNetwork for ObjNetwork {
delay_for(Duration::from_secs(d)).await; delay_for(Duration::from_secs(d)).await;
Ok(String::from("pong")) Ok(String::from("pong"))
} }
.boxed_local() .boxed_local()
} }
fn get(&self) -> u32 { fn get(&self) -> u32 {
@ -153,6 +153,6 @@ async fn main() -> std::io::Result<()> {
}) })
.bind("127.0.0.1:8080") .bind("127.0.0.1:8080")
.unwrap() .unwrap()
.start() .run()
.await .await
} }

View File

@ -5,7 +5,7 @@ authors = ["pyros2097 <pyros2097@gmail.com>"]
edition = "2018" edition = "2018"
[dependencies] [dependencies]
actix-web = "2.0.0-rc" actix-web = "2.0.0"
actix-rt = "1.0.0" actix-rt = "1.0.0"
env_logger = "0.7.1" env_logger = "0.7.1"
serde = "1.0.103" serde = "1.0.103"

View File

@ -53,6 +53,6 @@ async fn main() -> io::Result<()> {
.service(web::resource("/graphiql").route(web::get().to(graphiql))) .service(web::resource("/graphiql").route(web::get().to(graphiql)))
}) })
.bind("127.0.0.1:8080")? .bind("127.0.0.1:8080")?
.start() .run()
.await .await
} }

View File

@ -7,7 +7,7 @@ edition = "2018"
[dependencies] [dependencies]
actix-service = "1.0.0" actix-service = "1.0.0"
actix-rt = "1.0.0" actix-rt = "1.0.0"
actix-web = "2.0.0-rc" actix-web = "2.0.0"
futures = "0.3.1" futures = "0.3.1"
env_logger = "0.6" env_logger = "0.6"
bytes = "0.5" bytes = "0.5"

View File

@ -40,6 +40,6 @@ async fn main() -> std::io::Result<()> {
})) }))
}) })
.bind("127.0.0.1:8080")? .bind("127.0.0.1:8080")?
.start() .run()
.await .await
} }

View File

@ -12,5 +12,5 @@ readme = "README.md"
[dependencies] [dependencies]
futures = "0.3.1" futures = "0.3.1"
actix-multipart = "0.2.0" actix-multipart = "0.2.0"
actix-web = "2.0.0-rc" actix-web = "2.0.0"
actix-rt = "1.0.0" actix-rt = "1.0.0"

View File

@ -54,6 +54,6 @@ async fn main() -> std::io::Result<()> {
) )
}) })
.bind(ip)? .bind(ip)?
.start() .run()
.await .await
} }

View File

@ -7,6 +7,6 @@ workspace = ".."
[dependencies] [dependencies]
actix-rt = "1.0.0" actix-rt = "1.0.0"
actix-web = { version="2.0.0-rc", features=["openssl"] } actix-web = { version="2.0.0", features=["openssl"] }
env_logger = "0.6" env_logger = "0.6"
openssl = "0.10" openssl = "0.10"

View File

@ -39,6 +39,6 @@ async fn main() -> io::Result<()> {
}))) })))
}) })
.bind_openssl("127.0.0.1:8443", builder)? .bind_openssl("127.0.0.1:8443", builder)?
.start() .run()
.await .await
} }

View File

@ -6,7 +6,7 @@ edition = "2018"
[dependencies] [dependencies]
actix-rt = "1.0.0" actix-rt = "1.0.0"
actix-web = "2.0.0-rc" actix-web = "2.0.0"
futures = "0.3.1" futures = "0.3.1"
env_logger = "0.6" env_logger = "0.6"

View File

@ -49,6 +49,6 @@ async fn main() -> io::Result<()> {
.route("/{name}", web::get().to(index)) .route("/{name}", web::get().to(index))
}) })
.bind("127.0.0.1:8080")? .bind("127.0.0.1:8080")?
.start() .run()
.await .await
} }

View File

@ -6,7 +6,7 @@ edition = "2018"
[dependencies] [dependencies]
actix-rt = "1.0.0" actix-rt = "1.0.0"
actix-web = "2.0.0-rc" actix-web = "2.0.0"
actix-session = "0.3.0" actix-session = "0.3.0"
actix-redis = { version = "0.8.0", features = ["web"] } actix-redis = { version = "0.8.0", features = ["web"] }
env_logger = "0.6" env_logger = "0.6"

View File

@ -88,7 +88,7 @@ async fn main() -> std::io::Result<()> {
.service(resource("/logout").route(post().to(logout))) .service(resource("/logout").route(post().to(logout)))
}) })
.bind("127.0.0.1:8080")? .bind("127.0.0.1:8080")?
.start() .run()
.await .await
} }

View File

@ -7,7 +7,7 @@ edition = "2018"
[dependencies] [dependencies]
actix = "0.9.0" actix = "0.9.0"
actix-rt = "1.0.0" actix-rt = "1.0.0"
actix-web = "2.0.0-rc" actix-web = "2.0.0"
actix-redis = "0.8.0" actix-redis = "0.8.0"
futures = "0.3.1" futures = "0.3.1"
redis-async = "0.6.1" redis-async = "0.6.1"

View File

@ -93,6 +93,6 @@ async fn main() -> std::io::Result<()> {
) )
}) })
.bind("0.0.0.0:8080")? .bind("0.0.0.0:8080")?
.start() .run()
.await .await
} }

View File

@ -6,6 +6,6 @@ edition = "2018"
description = "Run actix-web in separate thread" description = "Run actix-web in separate thread"
[dependencies] [dependencies]
actix-web = "2.0.0-rc" actix-web = "2.0.0"
actix-rt = "1.0.0" actix-rt = "1.0.0"
env_logger = "0.6" env_logger = "0.6"

View File

@ -21,7 +21,7 @@ fn run_app(tx: mpsc::Sender<Server>) -> std::io::Result<()> {
.service(web::resource("/").to(index)) .service(web::resource("/").to(index))
}) })
.bind("127.0.0.1:8080")? .bind("127.0.0.1:8080")?
.start(); .run();
// send server controller to main thread // send server controller to main thread
let _ = tx.send(srv.clone()); let _ = tx.send(srv.clone());

View File

@ -12,6 +12,6 @@ path = "src/main.rs"
[dependencies] [dependencies]
env_logger = "0.5" env_logger = "0.5"
rustls = "0.16" rustls = "0.16"
actix-web = { version = "2.0.0-rc", features=["rustls"] } actix-web = { version = "2.0.0", features=["rustls"] }
actix-files = "0.2.0" actix-files = "0.2.1"
actix-rt = "1.0.0" actix-rt = "1.0.0"

View File

@ -44,6 +44,6 @@ async fn main() -> std::io::Result<()> {
.service(Files::new("/static", "static")) .service(Files::new("/static", "static"))
}) })
.bind_rustls("127.0.0.1:8443", config)? .bind_rustls("127.0.0.1:8443", config)?
.start() .run()
.await .await
} }

View File

@ -7,7 +7,7 @@ edition = "2018"
[dependencies] [dependencies]
actix-rt = "1.0.0" actix-rt = "1.0.0"
actix-web = "2.0.0-rc" actix-web = "2.0.0"
env_logger = "0.6" env_logger = "0.6"
futures = "0.3.1" futures = "0.3.1"
tokio = "0.2" tokio = "0.2"

View File

@ -23,7 +23,7 @@ async fn main() -> std::io::Result<()> {
.route("/broadcast/{msg}", web::get().to(broadcast)) .route("/broadcast/{msg}", web::get().to(broadcast))
}) })
.bind("127.0.0.1:8080")? .bind("127.0.0.1:8080")?
.start() .run()
.await .await
} }

View File

@ -7,7 +7,7 @@ workspace = ".."
[dependencies] [dependencies]
actix-identity = "0.2.0" actix-identity = "0.2.0"
actix-web = "2.0.0-rc" actix-web = "2.0.0"
actix-rt = "1.0.0" actix-rt = "1.0.0"
argonautica = "0.2.0" argonautica = "0.2.0"
chrono = { version = "0.4.6", features = ["serde"] } chrono = { version = "0.4.6", features = ["serde"] }

View File

@ -70,6 +70,6 @@ async fn main() -> std::io::Result<()> {
) )
}) })
.bind("127.0.0.1:3000")? .bind("127.0.0.1:3000")?
.start() .run()
.await .await
} }

View File

@ -5,7 +5,7 @@ authors = ["Nikolay Kim <fafhrd91@gmail.com>"]
edition = "2018" edition = "2018"
[dependencies] [dependencies]
actix-web = "2.0.0-rc" actix-web = "2.0.0"
actix-rt = "1.0.0" actix-rt = "1.0.0"
futures = "0.3.1" futures = "0.3.1"
env_logger = "0.6" env_logger = "0.6"

View File

@ -40,6 +40,6 @@ async fn main() -> io::Result<()> {
.service(web::resource("/").to(index)) .service(web::resource("/").to(index))
}) })
.bind("127.0.0.1:8080")? .bind("127.0.0.1:8080")?
.start() .run()
.await .await
} }

View File

@ -9,6 +9,6 @@ edition = "2018"
futures = "0.3.1" futures = "0.3.1"
env_logger = "0.6" env_logger = "0.6"
actix-web = "2.0.0-rc" actix-web = "2.0.0"
actix-files = "0.2.0" actix-files = "0.2.1"
actix-rt = "1.0.0" actix-rt = "1.0.0"

View File

@ -16,6 +16,6 @@ async fn main() -> std::io::Result<()> {
) )
}) })
.bind("127.0.0.1:8080")? .bind("127.0.0.1:8080")?
.start() .run()
.await .await
} }

View File

@ -5,7 +5,7 @@ authors = ["Nikolay Kim <fafhrd91@gmail.com>"]
edition = "2018" edition = "2018"
[dependencies] [dependencies]
actix-web = "2.0.0-rc" actix-web = "2.0.0"
actix-rt = "1.0.0" actix-rt = "1.0.0"
env_logger = "0.6" env_logger = "0.6"
askama = "0.8" askama = "0.8"

View File

@ -35,6 +35,6 @@ async fn main() -> std::io::Result<()> {
App::new().service(web::resource("/").route(web::get().to(index))) App::new().service(web::resource("/").route(web::get().to(index)))
}) })
.bind("127.0.0.1:8080")? .bind("127.0.0.1:8080")?
.start() .run()
.await .await
} }

View File

@ -5,7 +5,7 @@ authors = ["Alexandru Tiniuc <tiniuc.alexandru@gmail.com>"]
edition = "2018" edition = "2018"
[dependencies] [dependencies]
actix-web = "2.0.0-rc" actix-web = "2.0.0"
actix-rt = "1.0.0" actix-rt = "1.0.0"
handlebars = "2.0.0" handlebars = "2.0.0"
serde_json = "1.0" serde_json = "1.0"

View File

@ -54,6 +54,6 @@ async fn main() -> io::Result<()> {
.service(user) .service(user)
}) })
.bind("127.0.0.1:8080")? .bind("127.0.0.1:8080")?
.start() .run()
.await .await
} }

View File

@ -8,5 +8,5 @@ edition = "2018"
[dependencies] [dependencies]
env_logger = "0.6" env_logger = "0.6"
tera = "1.0" tera = "1.0"
actix-web = "2.0.0-rc" actix-web = "2.0.0"
actix-rt = "1.0.0" actix-rt = "1.0.0"

View File

@ -37,6 +37,6 @@ async fn main() -> std::io::Result<()> {
.service(web::resource("/").route(web::get().to(index))) .service(web::resource("/").route(web::get().to(index)))
}) })
.bind("127.0.0.1:8080")? .bind("127.0.0.1:8080")?
.start() .run()
.await .await
} }

View File

@ -13,7 +13,7 @@ env_logger = "0.7"
yarte = { git = "https://github.com/botika/yarte", features = ["with-actix-web"] } yarte = { git = "https://github.com/botika/yarte", features = ["with-actix-web"] }
actix-rt = "1.0" actix-rt = "1.0"
actix-web = "2.0.0-rc" actix-web = "2.0.0"
[build-dependencies] [build-dependencies]
yarte = { git = "https://github.com/botika/yarte", features = ["with-actix-web"] } yarte = { git = "https://github.com/botika/yarte", features = ["with-actix-web"] }

View File

@ -22,7 +22,7 @@ async fn main() -> std::io::Result<()> {
// start http server // start http server
HttpServer::new(move || App::new().wrap(Logger::default()).service(index)) HttpServer::new(move || App::new().wrap(Logger::default()).service(index))
.bind("127.0.0.1:8080")? .bind("127.0.0.1:8080")?
.start() .run()
.await .await
} }

View File

@ -5,8 +5,8 @@ version = "2.0.0"
edition = "2018" edition = "2018"
[dependencies] [dependencies]
actix-web = "2.0.0-rc" actix-web = "2.0.0"
actix-files = "0.2.0" actix-files = "0.2.1"
actix-session = "0.3.0" actix-session = "0.3.0"
actix-rt = "1.0.0" actix-rt = "1.0.0"
dotenv = "0.13.0" dotenv = "0.13.0"

View File

@ -60,5 +60,5 @@ async fn main() -> io::Result<()> {
}; };
debug!("Starting server"); debug!("Starting server");
HttpServer::new(app).bind("localhost:8088")?.start().await HttpServer::new(app).bind("localhost:8088")?.run().await
} }

View File

@ -7,5 +7,5 @@ edition = "2018"
[dependencies] [dependencies]
env_logger = "0.6" env_logger = "0.6"
actix-web = "2.0.0-rc" actix-web = "2.0.0"
actix-rt = "1.0.0" actix-rt = "1.0.0"

View File

@ -21,7 +21,7 @@ async fn main() -> std::io::Result<()> {
.service(web::resource("/").to(index)) .service(web::resource("/").to(index))
}) })
.bind_uds("/tmp/actix-uds.socket")? .bind_uds("/tmp/actix-uds.socket")?
.start() .run()
.await .await
} }

View File

@ -6,7 +6,7 @@ edition = "2018"
[dependencies] [dependencies]
actix-rt = "1.0.0" actix-rt = "1.0.0"
actix-web = "2.0.0-rc" actix-web = "2.0.0"
actix-cors = "0.2.0" actix-cors = "0.2.0"
serde = "1.0" serde = "1.0"
serde_derive = "1.0" serde_derive = "1.0"

View File

@ -26,6 +26,6 @@ async fn main() -> std::io::Result<()> {
.service(web::resource("/user/info").route(web::post().to(user::info))) .service(web::resource("/user/info").route(web::post().to(user::info)))
}) })
.bind("127.0.0.1:8000")? .bind("127.0.0.1:8000")?
.start() .run()
.await .await
} }

View File

@ -11,9 +11,9 @@ path = "src/main.rs"
[dependencies] [dependencies]
actix-rt = "1.0.0" actix-rt = "1.0.0"
actix = "0.9.0" actix = "0.9.0"
actix-web = "2.0.0-rc" actix-web = "2.0.0"
actix-web-actors = "2.0.0" actix-web-actors = "2.0.0"
actix-files = "0.2.0" actix-files = "0.2.1"
rand = "0.6" rand = "0.6"
bytes = "0.5.3" bytes = "0.5.3"

View File

@ -242,6 +242,6 @@ async fn main() -> std::io::Result<()> {
.service(fs::Files::new("/static/", "static/")) .service(fs::Files::new("/static/", "static/"))
}) })
.bind("127.0.0.1:8080")? .bind("127.0.0.1:8080")?
.start() .run()
.await .await
} }

View File

@ -14,9 +14,9 @@ path = "src/client.rs"
[dependencies] [dependencies]
actix = "0.9.0" actix = "0.9.0"
actix-web = "2.0.0-rc" actix-web = "2.0.0"
actix-web-actors = "2.0.0" actix-web-actors = "2.0.0"
actix-files = "0.2.0" actix-files = "0.2.1"
actix-rt = "1.0.0" actix-rt = "1.0.0"
actix-codec = "0.2.0" actix-codec = "0.2.0"

View File

@ -253,6 +253,6 @@ async fn main() -> std::io::Result<()> {
.service(fs::Files::new("/static/", "static/")) .service(fs::Files::new("/static/", "static/"))
}) })
.bind("127.0.0.1:8080")? .bind("127.0.0.1:8080")?
.start() .run()
.await .await
} }

View File

@ -15,9 +15,9 @@ path = "src/client.rs"
[dependencies] [dependencies]
actix = "0.9.0" actix = "0.9.0"
actix-codec = "0.2.0" actix-codec = "0.2.0"
actix-web = "2.0.0-rc" actix-web = "2.0.0"
actix-web-actors = "2.0.0" actix-web-actors = "2.0.0"
actix-files = "0.2.0" actix-files = "0.2.1"
actix-rt = "1.0.0" actix-rt = "1.0.0"
awc = "1.0.1" awc = "1.0.1"
env_logger = "0.6" env_logger = "0.6"

View File

@ -110,6 +110,6 @@ async fn main() -> std::io::Result<()> {
}) })
// start http server on 127.0.0.1:8080 // start http server on 127.0.0.1:8080
.bind("127.0.0.1:8080")? .bind("127.0.0.1:8080")?
.start() .run()
.await .await
} }