1
0
mirror of https://github.com/actix/actix-website synced 2025-03-10 10:22:40 +01:00
2020-09-12 16:21:54 +01:00

15 lines
314 B
Rust

// <directory>
use actix_files as fs;
use actix_web::{App, HttpServer};
#[actix_web::main]
async fn main() -> std::io::Result<()> {
HttpServer::new(|| {
App::new().service(fs::Files::new("/static", ".").show_files_listing())
})
.bind("127.0.0.1:8080")?
.run()
.await
}
// </directory>