swap backend to rust

This commit is contained in:
2025-07-16 16:43:24 +01:00
parent a674f5641d
commit 7dc46b6ad0
16 changed files with 2191 additions and 42 deletions

19
backend/src/routes/mod.rs Normal file
View File

@ -0,0 +1,19 @@
use axum::Router;
use axum::routing::{get, post};
use std::sync::mpsc;
mod healthcheck;
mod shutdown;
use healthcheck::healthcheck;
use shutdown::shutdown;
pub fn app() -> (Router, mpsc::Receiver<bool>) {
let (tx, rx) = mpsc::channel();
(
Router::new()
.route("/healthcheck", get(healthcheck))
.route("/shutdown", post(move || shutdown(tx.clone()))),
rx,
)
}