mirror of
https://github.com/cupcakearmy/cryptgeon.git
synced 2024-06-18 13:14:44 +02:00
Nicco
cacb808117
* restructuring * pin svelte kit version & parallel execution * update svelte kit * correct test result assets * add timeout * correct locale path * simplify crypto * fix for #58 * add verbosity flag * disable flaky test
18 lines
446 B
Rust
18 lines
446 B
Rust
use actix_files::{Files, NamedFile};
|
|
use actix_web::{web, Result};
|
|
|
|
use crate::config;
|
|
|
|
pub fn init(cfg: &mut web::ServiceConfig) {
|
|
cfg.service(
|
|
Files::new("/", config::FRONTEND_PATH.to_string())
|
|
.index_file("index.html")
|
|
.use_etag(true),
|
|
);
|
|
}
|
|
|
|
pub async fn index() -> Result<NamedFile> {
|
|
let index = format!("{}{}", config::FRONTEND_PATH.to_string(), "/index.html");
|
|
Ok(NamedFile::open(index)?)
|
|
}
|