domi-server 0.1.0

DOMicile live-server library (Phase 2c).
1
2
3
4
5
6
7
8
9
10
11
12
13
//! GET / — protocol banner (name + version + protocol version).

use axum::{response::IntoResponse, Json};
use serde_json::json;

pub async fn banner() -> impl IntoResponse {
    let b = crate::serve::banner::protocol_banner();
    Json(json!({
        "name": b[0].1,
        "version": b[1].1,
        "protocol": b[2].1,
    }))
}