forklaunch 1.35.1

Launch faster with forklaunch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//! Health check.
use crate::{SERVICE_NAME, registrations::AppState};
use axum::{Json, routing::any};
use forklaunch_ecommerce_stripe::http::Handler;
use serde_json::{Value, json};

/// Reports that the service is up.
pub fn get_health(_state: &AppState) -> Handler {
    any(health)
}

async fn health() -> Json<Value> {
    Json(json!({"service": SERVICE_NAME, "status": "ok"}))
}