1
0
mirror of https://github.com/actix/actix-extras.git synced 2025-06-25 01:51:23 +02:00

update examples

This commit is contained in:
Nikolay Kim
2017-12-18 13:06:41 -08:00
parent 27d92f3a23
commit 9ed4159c0c
5 changed files with 13 additions and 14 deletions

View File

@ -207,13 +207,14 @@ fn main() {
.header("LOCATION", "/static/websocket.html")
.body(Body::Empty)
}))
// websocket
// websocket
.resource("/ws/", |r| r.route().f(chat_route))
// static resources
// static resources
.resource("/static/{tail:.*}",
|r| r.h(fs::StaticFiles::new("tail", "static/", true)))
})
.serve::<_, ()>("127.0.0.1:8080").unwrap();
.bind("127.0.0.1:8080").unwrap()
.start().unwrap();
let _ = sys.run();
}