mirror of
https://github.com/fafhrd91/actix-web
synced 2025-09-02 01:31:57 +02:00
use Route for Applicaiton handlers
This commit is contained in:
@@ -32,7 +32,7 @@ extern crate actix_web;
|
||||
|
||||
fn main() {
|
||||
actix_web::Application::default("/")
|
||||
.route("/static", actix_web::fs::StaticFiles::new(".", true))
|
||||
.route("/static", |r| r.h(actix_web::fs::StaticFiles::new(".", true)))
|
||||
.finish();
|
||||
}
|
||||
```
|
||||
|
Reference in New Issue
Block a user