Skip to content

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

License

Notifications You must be signed in to change notification settings

PaulDotSH/sailfish-web

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages