1
0
mirror of https://github.com/actix/examples synced 2025-06-28 18:00:37 +02:00

enable files listing

This commit is contained in:
Nikolay Kim
2019-03-06 09:27:56 -08:00
parent 71e83fb87c
commit 40b5498902
2 changed files with 6 additions and 1 deletions

View File

@ -112,7 +112,7 @@ fn main() -> io::Result<()> {
})
})
// static files
.service(fs::StaticFiles::new("/static", "static").unwrap())
.service(fs::StaticFiles::new("/static", "static").show_files_listing())
// redirect
.resource("/", |r| {
r.route(web::get().to(|req: HttpRequest| {