hydracache-server 0.54.0

Standalone production server daemon for HydraCache.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use std::error::Error;

use hydracache_server::{ServerConfig, ServerRuntime};

fn main() -> Result<(), Box<dyn Error>> {
    let config = ServerConfig::from_env()?;
    let runtime = ServerRuntime::new(config)?.start();
    println!("{}", serde_json_like_health(runtime.health().status));
    Ok(())
}

fn serde_json_like_health(status: &str) -> String {
    format!(r#"{{"status":"{status}"}}"#)
}