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:
@@ -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();
|
||||
/// }
|
||||
/// ```
|
||||
|
Reference in New Issue
Block a user