tide-openssl

Crates.iotide-openssl
lib.rstide-openssl
version0.1.1
sourcesrc
created_at2021-08-19 13:57:25.695013
updated_at2021-08-26 01:14:10.739401
descriptiontide openssl listener based on async-std-openssl. Based on http-rs/tide-rustls
homepage
repositoryhttps://github.com/victorcwai/tide-openssl
max_upload_size
id439625
size74,582
vcwai (victorcwai)

documentation

https://docs.rs/tide-openssl

README

Tide openssl listener

openssl listener for tide using async-std-openssl

Based on tide-rustls

Using with tide

#[async_std::main]
async fn main() -> tide::Result<()> {
    let mut app = tide::new();
    app.at("/").get(|_| async { Ok("Hello TLS") });
    app.listen(
        TlsListener::build()
            .addrs("localhost:4433")
            .cert(std::env::var("TIDE_CERT_PATH").unwrap())
            .key(std::env::var("TIDE_KEY_PATH").unwrap()),
        )
        .await?;
    Ok(())
}

License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
Commit count: 77

cargo fmt