diff --git a/.gitignore b/.gitignore index dff6edb..aaab43d 100644 --- a/.gitignore +++ b/.gitignore @@ -24,7 +24,7 @@ Cargo.lock # already existing elements were commented out #/target - +.shuttle/ node_modules/ **/*.pdf diff --git a/Cargo.toml b/Cargo.toml index f5ed5f4..e1123a9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,8 +4,8 @@ version = "0.1.0" edition = "2021" [dependencies] -axum = "0.7.4" -shuttle-axum = "0.45.0" -shuttle-runtime = "0.45.0" +axum = "0.8.1" +shuttle-axum = "0.52.0" +shuttle-runtime = "0.52.0" tokio = "1.28.2" -tower-http = { version = "0.5.2", features = ["fs"] } +tower-http = { version = "0.6.2", features = ["fs"] } diff --git a/Shuttle.toml b/Shuttle.toml new file mode 100644 index 0000000..744e0d1 --- /dev/null +++ b/Shuttle.toml @@ -0,0 +1,4 @@ +[build] +assets = [ + "frontend/dist/frontend/browser/*", +] \ No newline at end of file diff --git a/frontend/src/index.html b/frontend/src/index.html index b7ab171..15fc948 100644 --- a/frontend/src/index.html +++ b/frontend/src/index.html @@ -2,7 +2,7 @@ - Frontend + Digitaler Frieden diff --git a/src/main.rs b/src/main.rs index 60cf5d6..1f0d2f5 100644 --- a/src/main.rs +++ b/src/main.rs @@ -2,10 +2,9 @@ use axum::Router; use tower_http::services::ServeDir; #[shuttle_runtime::main] +#[allow(clippy::unused_async)] async fn main() -> shuttle_axum::ShuttleAxum { - let router = Router::new() - // .route("/", get(hello_world)) - .nest_service("/", ServeDir::new("frontend/dist")); + let router = Router::new().fallback_service(ServeDir::new("frontend/dist/frontend/browser")); Ok(router.into()) }