chore: update dependencies for axum and shuttle packages

This commit is contained in:
itsscb 2025-03-04 20:42:05 +01:00
parent 515e7b3dd8
commit c57dd13356
5 changed files with 12 additions and 9 deletions

2
.gitignore vendored
View File

@ -24,7 +24,7 @@ Cargo.lock
# already existing elements were commented out # already existing elements were commented out
#/target #/target
.shuttle/
node_modules/ node_modules/
**/*.pdf **/*.pdf

View File

@ -4,8 +4,8 @@ version = "0.1.0"
edition = "2021" edition = "2021"
[dependencies] [dependencies]
axum = "0.7.4" axum = "0.8.1"
shuttle-axum = "0.45.0" shuttle-axum = "0.52.0"
shuttle-runtime = "0.45.0" shuttle-runtime = "0.52.0"
tokio = "1.28.2" tokio = "1.28.2"
tower-http = { version = "0.5.2", features = ["fs"] } tower-http = { version = "0.6.2", features = ["fs"] }

4
Shuttle.toml Normal file
View File

@ -0,0 +1,4 @@
[build]
assets = [
"frontend/dist/frontend/browser/*",
]

View File

@ -2,7 +2,7 @@
<html lang="en"> <html lang="en">
<head> <head>
<meta charset="utf-8"> <meta charset="utf-8">
<title>Frontend</title> <title>Digitaler Frieden</title>
<base href="/"> <base href="/">
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/x-icon" href="public/favicon.ico"> <link rel="icon" type="image/x-icon" href="public/favicon.ico">

View File

@ -2,10 +2,9 @@ use axum::Router;
use tower_http::services::ServeDir; use tower_http::services::ServeDir;
#[shuttle_runtime::main] #[shuttle_runtime::main]
#[allow(clippy::unused_async)]
async fn main() -> shuttle_axum::ShuttleAxum { async fn main() -> shuttle_axum::ShuttleAxum {
let router = Router::new() let router = Router::new().fallback_service(ServeDir::new("frontend/dist/frontend/browser"));
// .route("/", get(hello_world))
.nest_service("/", ServeDir::new("frontend/dist"));
Ok(router.into()) Ok(router.into())
} }