aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFuwn <[email protected]>2022-03-27 06:45:49 +0000
committerFuwn <[email protected]>2022-03-27 06:45:49 +0000
commitb939d7beac7900bb6570a7fdff2edee367eb72aa (patch)
tree4321a8b25ca6a1ea1f72191b9f4e84b7ec2907c5
parentfeat(cargo): bump version (diff)
downloadwindmark-b939d7beac7900bb6570a7fdff2edee367eb72aa.tar.xz
windmark-b939d7beac7900bb6570a7fdff2edee367eb72aa.zip
docs(readme): fix example
-rw-r--r--README.md4
1 files changed, 4 insertions, 0 deletions
diff --git a/README.md b/README.md
index 0d96360..bc5b44c 100644
--- a/README.md
+++ b/README.md
@@ -23,11 +23,15 @@ windmark = "0.1.1"
### Implement a Windmark server
```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_private.pem")
+ .set_certificate_chain_file("windmark_pair.pem")
.mount("/", |_| Response::Success("Hello, World!".into()))
.set_error_handler(|_| {
Response::PermanentFailure("This route does not exist!".into())