rpi-http 0.1.3

HTTP and SSE protocol adapter for the shared rpi extension core
Documentation
1
2
3
4
5
6
7
8
9
10
11
use rpi_http::config::{self, Launch};

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
    match config::from_args(std::env::args().skip(1))? {
        Launch::Help => println!("{}", config::HELP),
        Launch::Version => println!("rpi-http {}", env!("CARGO_PKG_VERSION")),
        Launch::Run(config) => rpi_http::run(*config).await?,
    }
    Ok(())
}