aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-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())