chc-service 0.2.0

A local web server that implements the chc (Chain Head Coordinator) interface in Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use chc_service::telemetry::initialize_tracing_subscriber;
use chc_service::{ChcService, LocalChcServerCli};
use clap::Parser;

#[tokio::main]
async fn main() -> anyhow::Result<()> {
    initialize_tracing_subscriber("info");

    let cli_args = LocalChcServerCli::parse();
    let chc_service: ChcService = cli_args.try_into()?;

    let address = chc_service.address();

    tracing::info!("Starting service on http://{}", address);
    chc_service.run().await?;

    Ok(())
}