diff options
| author | Fuwn <[email protected]> | 2022-03-27 06:45:49 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2022-03-27 06:45:49 +0000 |
| commit | b939d7beac7900bb6570a7fdff2edee367eb72aa (patch) | |
| tree | 4321a8b25ca6a1ea1f72191b9f4e84b7ec2907c5 | |
| parent | feat(cargo): bump version (diff) | |
| download | windmark-b939d7beac7900bb6570a7fdff2edee367eb72aa.tar.xz windmark-b939d7beac7900bb6570a7fdff2edee367eb72aa.zip | |
docs(readme): fix example
| -rw-r--r-- | README.md | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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()) |