fallback route & dep updates

This commit is contained in:
2022-03-05 12:47:11 +01:00
parent e02f7f59c6
commit d576b71bc5
10 changed files with 308 additions and 236 deletions

View File

@@ -1,5 +1,5 @@
use actix_files::Files;
use actix_web::web;
use actix_files::{Files, NamedFile};
use actix_web::{web, Result};
pub fn init(cfg: &mut web::ServiceConfig) {
cfg.service(
@@ -8,3 +8,7 @@ pub fn init(cfg: &mut web::ServiceConfig) {
.use_etag(true),
);
}
pub async fn index() -> Result<NamedFile> {
Ok(NamedFile::open("./frontend/build/index.html")?)
}