feat: initialization migration to Nuxt + Backend

This commit initializes both the Nuxt frontend and the Rust backend of
the new version of phundrak.com
This commit is contained in:
2025-11-04 09:17:18 +01:00
parent cc62d0bb95
commit 007c3d1c18
134 changed files with 17247 additions and 8335 deletions

View File

@@ -0,0 +1,29 @@
use poem_openapi::{ApiResponse, OpenApi};
use super::ApiCategory;
#[derive(ApiResponse)]
enum HealthResponse {
#[oai(status = 200)]
Ok,
}
pub struct HealthApi;
#[OpenApi(prefix_path = "/v1/health-check", tag = "ApiCategory::Health")]
impl HealthApi {
#[oai(path = "/", method = "get")]
async fn ping(&self) -> HealthResponse {
tracing::event!(target: "backend", tracing::Level::DEBUG, "Accessing health-check endpoint");
HealthResponse::Ok
}
}
#[tokio::test]
async fn health_check_works() {
let app = crate::get_test_app();
let cli = poem::test::TestClient::new(app);
let resp = cli.get("/v1/health-check").send().await;
resp.assert_status_is_ok();
resp.assert_text("").await;
}