formatting

This commit is contained in:
2022-03-12 14:07:33 +01:00
parent 44f43dbc2c
commit 19022e7cb5
8 changed files with 143 additions and 143 deletions

View File

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