rust-web-server 17.57.1

A dependency-minimal Rust web platform: HTTP/1.1, HTTP/2, and HTTP/3 server, reverse proxy, and application framework with routing, middleware (auth, rate limiting, tracing), an async ORM, background jobs, object storage, and a mailer. Runs as a zero-code config-driven proxy or as a library crate. No third-party HTTP dependencies.
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);
}