https://github.com/gemrest/windmark-comments
💠A comment engine module for Windmark
https://github.com/gemrest/windmark-comments
gemini gemini-protocol gemini-server windmark
Last synced: 7 months ago
JSON representation
💠A comment engine module for Windmark
- Host: GitHub
- URL: https://github.com/gemrest/windmark-comments
- Owner: gemrest
- License: gpl-3.0
- Created: 2022-04-01T08:28:40.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-04-03T09:37:17.000Z (almost 4 years ago)
- Last Synced: 2025-02-09T04:19:22.944Z (11 months ago)
- Topics: gemini, gemini-protocol, gemini-server, windmark
- Language: Rust
- Homepage:
- Size: 27.3 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Windmark Comments
[](https://crates.io/crates/windmark-comments)
[](https://docs.rs/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.3"
```
### Attach Windmark Comments as a module (Windmark >= 0.1.8)
```rust
// src/main.rs
use windmark::Response;
#[windmark::main]
fn main() -> Result<(), Box> {
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
}
```
### Attach Windmark Comments as a module (Windmark <= 0.1.7)
```rust
// src/main.rs
use windmark::Response;
#[windmark::main]
fn main() -> Result<(), Box> {
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).