16 unstable releases (3 breaking)

0.4.0-alpha.3 Jan 9, 2023
0.4.0-alpha.2 Jan 7, 2023
0.4.0-alpha.1 Dec 24, 2022
0.3.5 Nov 25, 2022
0.1.1 Aug 25, 2022

#67 in #handler

48 downloads per month

MIT license

87KB
2.5K SLoC

Juri

HTTP Framework

Getting Started

Please refer to Juri Document

Example

cargo add juri
cargo add async-std
use juri::{Request, Response, Router, handler};
use std::net::SocketAddr;

#[handler]
fn handle_index(_request: &Request) -> juri::Result<Response> {
    Ok(Response::html("Hello Juri"))
}

#[juri::main]
async fn main() {
    let mut router = Router::new();
    router.at("/").get(handle_index);

    let addr = SocketAddr::from(([127, 0, 0, 1], 7878));
    juri::Server::bind(addr).server(router).await.unwrap();
}

License

MIT License

Dependencies

~10–22MB
~317K SLoC