1
0
mirror of https://github.com/actix/actix-website synced 2024-11-25 17:22:42 +01:00
actix-website/examples/static-files/src/configuration_two.rs

19 lines
370 B
Rust
Raw Normal View History

2019-06-17 23:35:47 +02:00
// <config-two>
2019-06-26 10:27:25 +02:00
use actix_files as fs;
use actix_web::{App, HttpServer};
2019-06-17 23:35:47 +02:00
2019-06-26 10:27:25 +02:00
pub fn main() {
HttpServer::new(|| {
App::new().service(
fs::Files::new("/static", ".")
.show_files_listing()
.use_last_modified(true),
)
})
.bind("127.0.0.1:8088")
.unwrap()
.run()
.unwrap();
}
2019-06-17 23:35:47 +02:00
// </config-two>