1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-09-01 01:16:59 +02:00

simplify application creation

This commit is contained in:
Nikolay Kim
2017-12-06 11:00:39 -08:00
parent 87c7441f7d
commit c63f058647
26 changed files with 150 additions and 138 deletions

View File

@@ -194,11 +194,12 @@ impl FromRequest for FilesystemElement {
/// Can be registered with `Application::route_handler()`.
///
/// ```rust
/// extern crate actix_web;
/// # extern crate actix_web;
/// use actix_web::{fs, Application};
///
/// fn main() {
/// let app = actix_web::Application::default("/")
/// .resource("/static", |r| r.h(actix_web::fs::StaticFiles::new(".", true)))
/// let app = Application::new("/")
/// .resource("/static", |r| r.h(fs::StaticFiles::new(".", true)))
/// .finish();
/// }
/// ```