From 40b5498902aced8ba3babd55ec2dc5979fd4a64e Mon Sep 17 00:00:00 2001 From: Nikolay Kim Date: Wed, 6 Mar 2019 09:27:56 -0800 Subject: [PATCH] enable files listing --- basics/Cargo.toml | 5 +++++ basics/src/main.rs | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/basics/Cargo.toml b/basics/Cargo.toml index b13337c7..ddb7736e 100644 --- a/basics/Cargo.toml +++ b/basics/Cargo.toml @@ -7,10 +7,15 @@ edition = "2018" [dependencies] actix-rt = "0.1" + actix-web = { git="https://github.com/actix/actix-web.git", branch = "1.0" } actix-session = { git="https://github.com/actix/actix-web.git", branch = "1.0" } actix-staticfiles = { git="https://github.com/actix/actix-web.git", branch = "1.0" } +#actix-web = { path="../../actix-web/" } +#actix-session = { path="../../actix-web/actix-session/" } +#actix-staticfiles = { path="../../actix-web/actix-staticfiles/" } + futures = "0.1.25" env_logger = "0.5" bytes = "0.4" diff --git a/basics/src/main.rs b/basics/src/main.rs index fded1c3a..0700d9d2 100644 --- a/basics/src/main.rs +++ b/basics/src/main.rs @@ -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| {