diff --git a/basics/Cargo.toml b/basics/Cargo.toml index 518a4637..71a98837 100644 --- a/basics/Cargo.toml +++ b/basics/Cargo.toml @@ -8,8 +8,8 @@ edition = "2018" [dependencies] actix-rt = "0.2" actix-web = { git="https://github.com/actix/actix-web.git", branch = "1.0" } +actix-files = { 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" } futures = "0.1.25" env_logger = "0.5" diff --git a/basics/src/main.rs b/basics/src/main.rs index d4f6eae0..8768718c 100644 --- a/basics/src/main.rs +++ b/basics/src/main.rs @@ -1,7 +1,7 @@ use std::{env, io}; +use actix_files as fs; use actix_session::{CookieSession, Session}; -use actix_staticfiles as fs; use actix_web::extract::Path; use actix_web::http::{header, Method, StatusCode}; use actix_web::{ @@ -112,7 +112,7 @@ fn main() -> io::Result<()> { ) })) // static files - .service(fs::StaticFiles::new("/static", "static").show_files_listing()) + .service(fs::Files::new("/static", "static").show_files_listing()) // redirect .service(web::resource("/").route(web::get().to(|req: HttpRequest| { println!("{:?}", req);