mirror of
https://github.com/cupcakearmy/cryptgeon.git
synced 2026-04-02 18:05:23 +00:00
serve spa
This commit is contained in:
10
src/client.rs
Normal file
10
src/client.rs
Normal file
@@ -0,0 +1,10 @@
|
||||
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")
|
||||
}
|
||||
Reference in New Issue
Block a user