generated from lucien/actix-react-template
14 lines
300 B
Rust
14 lines
300 B
Rust
use actix_web::{App, HttpServer};
|
|
use actix_files::Files;
|
|
|
|
#[actix_web::main]
|
|
async fn main() -> std::io::Result<()> {
|
|
HttpServer::new(|| {
|
|
App::new()
|
|
.service(Files::new("/", "./public").index_file("index.html"))
|
|
})
|
|
.bind(("0.0.0.0", 8080))?
|
|
.run()
|
|
.await
|
|
}
|
|
|