use windmark::Response;
#[windmark::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
windmark_comments::set_max_comments(10);
windmark::Router::new()
.set_private_key_file("windmark_comments_private.pem")
.set_certificate_file("windmark_comments_public.pem")
.attach_stateless(windmark_comments::module)
.mount(
"/",
Box::new(|_| {
Response::Success(
"# WINDMARK COMMENTS\nHello, World!\n=> /other To another route!"
.to_string(),
)
}),
)
.mount(
"/other",
Box::new(|_| {
Response::Success(
"# OTHER\nComments also show up on this route!\n=> / Back to the \
main route!"
.to_string(),
)
}),
)
.run()
.await
}