mirror of
https://github.com/fafhrd91/actix-web
synced 2025-06-25 06:39:22 +02:00
add Item and Error to FromRequest trait
This commit is contained in:
@ -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");
|
||||
|
@ -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();
|
||||
|
@ -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();
|
||||
|
||||
|
Reference in New Issue
Block a user