1
0
mirror of https://github.com/actix/actix-extras.git synced 2025-06-25 18:09:22 +02:00

handle http connections in different threads

This commit is contained in:
Nikolay Kim
2017-12-12 17:21:00 -08:00
parent 55818028cb
commit ab6efd2421
6 changed files with 394 additions and 117 deletions

View File

@ -30,7 +30,7 @@ fn main() {
let pkcs12 = Pkcs12::from_der(&pkcs12).unwrap().parse("12345").unwrap();
HttpServer::new(
Application::new("/")
|| Application::new()
// enable logger
.middleware(middlewares::Logger::default())
// register simple handler, handle all methods
@ -42,7 +42,7 @@ fn main() {
.header("LOCATION", "/index.html")
.body(Body::Empty)
})))
.serve_tls::<_, ()>("127.0.0.1:8443", pkcs12).unwrap();
.serve_tls::<_, ()>("127.0.0.1:8443", &pkcs12).unwrap();
println!("Started http server: 127.0.0.1:8443");
let _ = sys.run();