1
0
mirror of https://github.com/actix/actix-extras.git synced 2025-06-26 18:37:41 +02:00

simplify StaticFiles

This commit is contained in:
Nikolay Kim
2018-04-06 19:34:55 -07:00
parent 602d78b76c
commit 542315ce7f
7 changed files with 35 additions and 29 deletions

View File

@ -55,7 +55,7 @@ fn main() {
// websocket route
.resource("/ws/", |r| r.method(http::Method::GET).f(ws_index))
// static files
.handler("/", fs::StaticFiles::new("../static/", true)
.handler("/", fs::StaticFiles::new("../static/")
.index_file("index.html")))
// start http server on 127.0.0.1:8080
.bind("127.0.0.1:8080").unwrap()