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:
@ -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();
|
||||
|
@ -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();
|
||||
|
@ -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();
|
||||
|
@ -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();
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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();
|
||||
|
Reference in New Issue
Block a user