tide 0.16.0

A minimal and pragmatic Rust web application framework built for rapid development
Documentation
1
2
3
4
5
6
7
8
9
10
#[async_std::main]
async fn main() -> Result<(), std::io::Error> {
    tide::log::start();
    let mut app = tide::new();
    app.at("/").get(|_| async { Ok("visit /src/*") });
    app.at("/src").serve_dir("src/")?;
    app.at("/example").serve_file("examples/static_file.html")?;
    app.listen("127.0.0.1:8080").await?;
    Ok(())
}