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