mirror of
https://github.com/actix/actix-website
synced 2025-01-23 00:25:55 +01:00
19 lines
370 B
Rust
19 lines
370 B
Rust
// <config-two>
|
|
use actix_files as fs;
|
|
use actix_web::{App, HttpServer};
|
|
|
|
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();
|
|
}
|
|
// </config-two>
|