meshd/src/main.rs

18 lines
441 B
Rust

use actix_files as fs;
use actix_web::{App, HttpServer};
pub const ADDR_STR: &str = "0.0.0.0:1500";
#[actix_web::main]
async fn main() -> std::io::Result<()> {
println!("http://{}", ADDR_STR);
HttpServer::new(|| {
App::new().service(
fs::Files::new("/", "assets/")
.show_files_listing()
.use_last_modified(true),
)
})
.bind("0.0.0.0:1500")?
.run()
.await
}