mirror of
https://github.com/cupcakearmy/cryptgeon.git
synced 2024-12-23 00:36:28 +00:00
11 lines
289 B
Rust
11 lines
289 B
Rust
|
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")
|
||
|
}
|