diff options
| author | Fuwn <[email protected]> | 2022-04-01 01:08:02 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2022-04-01 01:08:02 -0700 |
| commit | 7a8ce1eca588e08b085f3bb413416d2ff315d90d (patch) | |
| tree | c3df9902e984b79a46dceafbc667cc14c4501b6e /README.md | |
| download | windmark-comments-7a8ce1eca588e08b085f3bb413416d2ff315d90d.tar.xz windmark-comments-7a8ce1eca588e08b085f3bb413416d2ff315d90d.zip | |
feat: prep for 0.1.0
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/README.md b/README.md new file mode 100644 index 0000000..b82f1cf --- /dev/null +++ b/README.md @@ -0,0 +1,50 @@ +# Windmark Comments + +[](https://github.com/gemrest/windmark-comments/actions/workflows/check.yaml) + +A comment engine module for Windmark. + +## Usage + +### Add Windmark Comments as a dependency + +```toml +# Cargo.toml + +[dependencies] +windmark-comments = "0.1.0" +``` + +### Attach Windmark Comments as a module + +```rust +// 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 + +Examples can be found within the +[`examples`](https://github.com/gemrest/windmark-comments/tree/main/examples) +directory. + +## License + +This project is licensed with the +[GNU General Public License v3.0](https://github.com/gemrest/windmark-comments/blob/main/LICENSE). |