1
0
mirror of https://github.com/actix/actix-extras.git synced 2025-06-25 18:09:22 +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

@ -93,7 +93,7 @@ fn main() {
.body(Body::Empty)
})))
.bind("127.0.0.1:8080").unwrap()
.start().unwrap();
.start();
println!("Started http server: 127.0.0.1:8080");
let _ = sys.run();

View File

@ -105,7 +105,7 @@ fn main() {
.middleware(middlewares::Logger::default())
.resource("/{name}", |r| r.method(Method::GET).a(index))})
.bind("127.0.0.1:8080").unwrap()
.start().unwrap();
.start();
println!("Started http server: 127.0.0.1:8080");
let _ = sys.run();

View File

@ -71,7 +71,7 @@ fn main() {
// register simple handler, handle all methods
.resource("/", |r| r.f(index)))
.bind("127.0.0.1:8080").unwrap()
.start().unwrap();
.start();
println!("Started http server: 127.0.0.1:8080");
let _ = sys.run();

View File

@ -37,7 +37,7 @@ fn main() {
.middleware(middlewares::Logger::default())
.resource("/", |r| r.method(Method::GET).f(index))})
.bind("127.0.0.1:8080").unwrap()
.start().unwrap();
.start();
println!("Started http server: 127.0.0.1:8080");
let _ = sys.run();

View File

@ -214,7 +214,7 @@ fn main() {
|r| r.h(fs::StaticFiles::new("tail", "static/", true)))
})
.bind("127.0.0.1:8080").unwrap()
.start().unwrap();
.start();
let _ = sys.run();
}

View File

@ -71,7 +71,7 @@ fn main() {
|r| r.h(fs::StaticFiles::new("tail", "examples/static/", true))))
// start http server on 127.0.0.1:8080
.bind("127.0.0.1:8080").unwrap()
.start().unwrap();
.start();
println!("Started http server: 127.0.0.1:8080");
let _ = sys.run();