mirror of
https://github.com/actix/actix-website
synced 2025-02-02 12:19:04 +01:00
13 lines
313 B
Rust
13 lines
313 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>
|