1use axum::http::{
4 header::{self, HeaderValue},
5 HeaderMap,
6};
7use axum::Json;
8use kova_gui::index_html;
9use serde_json::{json, Value};
10
11pub async fn health() -> Json<Value> {
13 Json(json!({
14 "status": "ok",
15 "service": "kova",
16 "version": env!("CARGO_PKG_VERSION"),
17 }))
18}
19
20pub async fn index() -> (HeaderMap, String) {
22 let mut headers = HeaderMap::new();
23 headers.insert(
24 header::CONTENT_TYPE,
25 HeaderValue::from_static("text/html; charset=utf-8"),
26 );
27 (headers, index_html())
28}