tinyhttp 0.6.0

A HTTP library with SSL and GZIP support
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use tinyhttp::prelude::*;

fn main() -> Result<(), Box<dyn std::error::Error>> {
    simple_logger::SimpleLogger::new()
        .with_level(log::LevelFilter::Info)
        .init()?;
    let sock = std::net::TcpListener::bind("0.0.0.0:9001")?;
    let config = Config::new().mount_point("./");
    let http = HttpListener::new(sock, config);
    http.start();

    Ok(())
}