14 lines
371 B
Rust

mod api;
use axum::Router;
use tower_http::services::{ServeDir, ServeFile};
const VERSION: &str = env!("CARGO_PKG_VERSION");
pub fn new() -> Router {
Router::new().nest("/api", api::new()).fallback_service(
ServeDir::new("frontend/dist/frontend/browser")
.not_found_service(ServeFile::new("frontend/dist/frontend/browser/index.html")),
)
}