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

add Item and Error to FromRequest trait

This commit is contained in:
Nikolay Kim
2017-12-03 14:22:04 -08:00
parent 6bc7d60f52
commit 7c6faaa8e0
14 changed files with 178 additions and 108 deletions

View File

@ -89,7 +89,7 @@ fn main() {
}
})
// static files
.route("/static", StaticFiles::new("examples/static/", true)))
.route("/static", fs::StaticFiles::new("examples/static/", true)))
.serve::<_, ()>("127.0.0.1:8080").unwrap();
println!("Started http server: 127.0.0.1:8080");

View File

@ -208,7 +208,7 @@ fn main() {
// websocket
.resource("/ws/", |r| r.get(chat_route))
// static resources
.route("/static", StaticFiles::new("static/", true)))
.route("/static", fs::StaticFiles::new("static/", true)))
.serve::<_, ()>("127.0.0.1:8080").unwrap();
let _ = sys.run();

View File

@ -67,7 +67,7 @@ fn main() {
// websocket route
.resource("/ws/", |r| r.get(ws_index))
// static files
.route("/", StaticFiles::new("examples/static/", true)))
.route("/", fs::StaticFiles::new("examples/static/", true)))
// start http server on 127.0.0.1:8080
.serve::<_, ()>("127.0.0.1:8080").unwrap();