penguin 0.1.9

Dev server with auto-reload, static file server, proxy support, and more. Language and framework agnostic. This is the library crate, but Penguin exists as a CLI app, too.
Documentation
use std::path::Path;

use penguin::Server;


#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let (server, _controller) = Server::bind(([127, 0, 0, 1], 3001).into())
        .add_mount("/", Path::new("."))?
        .build()?;

    // // Dummy code to regularly reload all sessions.
    // tokio::spawn(async move {
    //     let mut interval = tokio::time::interval(std::time::Duration::from_secs(3));
    //     loop {
    //         interval.tick().await;
    //         controller.reload();
    //     }
    // });

    server.await?;

    Ok(())
}