sailfish-web

Crates.iosailfish-web
lib.rssailfish-web
version0.1.1
sourcesrc
created_at2024-06-11 20:33:08.337985
updated_at2024-06-17 09:42:10.24668
descriptionSimple extension crate that enables a simpler api for web server crates
homepagehttps://github.com/pauldotsh/sailfish-web
repositoryhttps://github.com/pauldotsh/sailfish-web
max_upload_size
id1268891
size75,466
(PaulDotSH)

documentation

README

Sailfish-Web

Simple extension crate that enables a simpler api for web server crates and other conveniences

Examples

#[derive(TemplateOnce)]
#[template(path = "test.stpl")]
struct TestTemplate<'a> {
    s: &'a str,
}

#[get("/hello")]
fn hello() -> RawHtml<String> {
    TemplateWrapper::from(TestTemplate { s: "test" }).into()
}

#[launch]
fn rocket() -> _ {
    rocket::build().mount("/", routes![hello])
}

For more examples you can check the examples.

Commit count: 3

cargo fmt