cryptgeon/src/client.rs

11 lines
289 B
Rust
Raw Normal View History

2021-05-02 10:32:03 +00:00
use actix_files::{Files, NamedFile};
use actix_web::{web, Responder};
pub fn init(cfg: &mut web::ServiceConfig) {
cfg.service(Files::new("/", "./client/build").index_file("index.html"));
}
pub async fn fallback_fn() -> impl Responder {
NamedFile::open("./client/build/index.html")
}