mirror of
https://github.com/actix/examples
synced 2024-11-27 16:02:57 +01:00
update deps
This commit is contained in:
parent
a0812c9b29
commit
e8ab9ee7ca
@ -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"
|
||||||
|
@ -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
|
||||||
}
|
}
|
||||||
|
@ -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"
|
||||||
|
@ -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
|
||||||
}
|
}
|
||||||
|
@ -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"
|
||||||
|
@ -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
|
||||||
}
|
}
|
||||||
|
@ -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"
|
||||||
|
|
||||||
|
@ -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
|
||||||
}
|
}
|
||||||
|
@ -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"
|
||||||
|
@ -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
|
||||||
}
|
}
|
||||||
|
@ -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"
|
||||||
|
|
||||||
|
@ -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
|
||||||
}
|
}
|
||||||
|
@ -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"
|
||||||
|
@ -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
|
||||||
}
|
}
|
||||||
|
@ -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"
|
||||||
|
@ -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
|
||||||
}
|
}
|
||||||
|
@ -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"
|
||||||
|
@ -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(),
|
||||||
});
|
});
|
||||||
|
@ -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"
|
||||||
|
|
||||||
|
@ -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
|
||||||
}
|
}
|
||||||
|
@ -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"
|
||||||
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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"
|
||||||
|
@ -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
|
||||||
}
|
}
|
||||||
|
@ -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"
|
||||||
|
|
||||||
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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"
|
||||||
|
@ -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
|
||||||
}
|
}
|
||||||
|
@ -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"
|
||||||
|
@ -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
|
||||||
}
|
}
|
||||||
|
@ -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"
|
||||||
|
@ -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
|
||||||
}
|
}
|
||||||
|
@ -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"
|
||||||
|
@ -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
|
||||||
}
|
}
|
||||||
|
@ -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"
|
||||||
|
@ -54,6 +54,6 @@ async fn main() -> std::io::Result<()> {
|
|||||||
)
|
)
|
||||||
})
|
})
|
||||||
.bind(ip)?
|
.bind(ip)?
|
||||||
.start()
|
.run()
|
||||||
.await
|
.await
|
||||||
}
|
}
|
||||||
|
@ -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"
|
||||||
|
@ -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
|
||||||
}
|
}
|
||||||
|
@ -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"
|
||||||
|
@ -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
|
||||||
}
|
}
|
||||||
|
@ -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"
|
||||||
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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"
|
||||||
|
@ -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
|
||||||
}
|
}
|
||||||
|
@ -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"
|
@ -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());
|
||||||
|
@ -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"
|
||||||
|
@ -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
|
||||||
}
|
}
|
||||||
|
@ -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"
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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"] }
|
||||||
|
@ -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
|
||||||
}
|
}
|
||||||
|
@ -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"
|
||||||
|
@ -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
|
||||||
}
|
}
|
||||||
|
@ -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"
|
||||||
|
@ -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
|
||||||
}
|
}
|
||||||
|
@ -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"
|
||||||
|
@ -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
|
||||||
}
|
}
|
||||||
|
@ -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"
|
@ -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
|
||||||
}
|
}
|
||||||
|
@ -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"
|
||||||
|
@ -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
|
||||||
}
|
}
|
||||||
|
@ -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"] }
|
||||||
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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"
|
||||||
|
@ -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
|
||||||
}
|
}
|
||||||
|
@ -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"
|
||||||
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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"
|
||||||
|
@ -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
|
||||||
}
|
}
|
||||||
|
@ -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"
|
||||||
|
@ -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
|
||||||
}
|
}
|
||||||
|
@ -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"
|
||||||
|
|
||||||
|
@ -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
|
||||||
}
|
}
|
||||||
|
@ -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"
|
||||||
|
@ -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
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user