Crates.io | windmark-comments |
lib.rs | windmark-comments |
version | 0.1.3 |
source | src |
created_at | 2022-04-01 08:28:48.520316 |
updated_at | 2022-04-03 09:36:58.512882 |
description | A comment engine module for Windmark |
homepage | https://github.com/gemrest/windmark-comments |
repository | https://github.com/gemrest/windmark-comments |
max_upload_size | |
id | 560169 |
size | 66,915 |
A comment engine module for Windmark.
# Cargo.toml
[dependencies]
windmark-comments = "0.1.3"
// src/main.rs
use windmark::Response;
#[windmark::main]
fn main() -> Result<(), Box<dyn std::error::Error>> {
windmark::Router::new()
.set_private_key_file("windmark_comments_private.pem")
.set_certificate_file("windmark_comments_public.pem")
.mount("/", Box::new(|_| Response::Success("Hello, World!".into())))
.set_error_handler(Box::new(|_| {
Response::PermanentFailure("This route does not exist!".into())
}))
// Attach Windmark Comments
.attach_stateless(windmark_comments::module)
.run()
.await
}
// src/main.rs
use windmark::Response;
#[windmark::main]
fn main() -> Result<(), Box<dyn std::error::Error>> {
windmark::Router::new()
.set_private_key_file("windmark_comments_private.pem")
.set_certificate_file("windmark_comments_public.pem")
.mount("/", Box::new(|_| Response::Success("Hello, World!".into())))
.set_error_handler(Box::new(|_| {
Response::PermanentFailure("This route does not exist!".into())
}))
// Attach Windmark Comments
.attach(windmark_comments::module)
.run()
.await
}
Examples can be found within the
examples
directory.
This project is licensed with the GNU General Public License v3.0.