Default handler for root path set to index.html
This commit is contained in:
parent
b3124948c4
commit
867eb24d5d
1 changed files with 5 additions and 1 deletions
|
@ -37,7 +37,11 @@ async fn main() -> std::io::Result<()> {
|
|||
.app_data(Data::new(data.clone()))
|
||||
.app_data(Data::new(capt_db.clone())),
|
||||
)
|
||||
.service(Files::new("/", "./public").index_file("index.html"))
|
||||
.service(
|
||||
Files::new("/", "./public")
|
||||
.index_file("index.html")
|
||||
.default_handler(actix_files::NamedFile::open("./public/index.html").unwrap()),
|
||||
)
|
||||
})
|
||||
.bind("0.0.0.0:8080")?
|
||||
.run()
|
||||
|
|
Loading…
Reference in a new issue