motorx 0.0.15

A reverse-proxy in pure rust.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use motorx_core::Server;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    motorx::setup_tracing();
    let config = motorx::config_from_args()?;

    if config.private_key.is_some() && config.certs.is_some() {
        Server::new_tls(config)
    } else {
        Server::new(config)
    }
    .run()
    .await
    .map_err(Into::into)
}