1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-06-24 22:37:35 +02:00

simplify server start method

This commit is contained in:
Nikolay Kim
2017-12-19 09:08:36 -08:00
parent 4f6145e5c7
commit 13cbfc877d
9 changed files with 20 additions and 17 deletions

View File

@ -22,7 +22,7 @@ fn main() {
|| Application::new()
.resource("/", |r| r.f(|_| httpcodes::HTTPOk)))
.bind("127.0.0.1:59080").unwrap()
.start().unwrap();
.start();
# actix::Arbiter::system().send(actix::msgs::SystemExit(0));
let _ = sys.run();
@ -78,7 +78,8 @@ fn main() {
HttpServer::new(
|| Application::new()
.resource("/index.html", |r| r.f(index)))
.serve_ssl::<_, ()>("127.0.0.1:8080", pkcs12).unwrap();
.bind("127.0.0.1:8080").unwrap()
.serve_ssl(pkcs12).unwrap();
}
```