rust-web-server 18.8.1

Single-binary web server and reverse proxy: automatic HTTPS (Let's Encrypt), HTTP/1.1, HTTP/2 and HTTP/3, load balancing, auth and rate limiting, configured in one TOML file. Also a Rust library: routing, middleware, MCP server, ORM, background jobs. No hyper, no Tower; HTTP/2 and HTTP/3 framing via h2 and quinn.
Documentation
use crate::app::App;
use crate::core::New;
use crate::server::Server;

// not a test because Server::run runs infinite loop to listen for incoming connections
// it means test would never finish
fn _example() {
    let new_server = Server::setup();
    if new_server.is_err() {
        eprintln!("{}", new_server.as_ref().err().unwrap());
    }


    let (listener, pool) = new_server.unwrap();
    let app = App::new();


    // server listens for incoming connections and executes your app's logic via thread pool
    Server::run(listener, pool, app);
}