1
0
mirror of https://github.com/actix/actix-extras.git synced 2025-06-27 10:39:03 +02:00

better connection handling

This commit is contained in:
Nikolay Kim
2018-01-22 00:40:50 -08:00
parent 69c3ab2f92
commit 237030dbfc
7 changed files with 291 additions and 63 deletions

View File

@ -28,8 +28,8 @@ fn index(mut req: HttpRequest) -> Result<HttpResponse> {
}
fn main() {
::std::env::set_var("RUST_LOG", "actix_web=info");
let _ = env_logger::init();
::std::env::set_var("RUST_LOG", "actix_web=info,actix_redis=info");
env_logger::init();
let sys = actix::System::new("basic-example");
HttpServer::new(
@ -39,7 +39,6 @@ fn main() {
// cookie session middleware
.middleware(middleware::SessionStorage::new(
RedisSessionBackend::new("127.0.0.1:6379", &[0; 32])
.expect("Can not connect to redis server")
))
// register simple route, handle all methods
.resource("/", |r| r.f(index)))