diff options
| author | Fuwn <[email protected]> | 2022-07-31 18:44:07 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2022-07-31 18:44:07 +0000 |
| commit | c7d48a8c693645d4af45f530a52ebbe570649e1c (patch) | |
| tree | 74005c2df212f9d49ab4cf558a182ba5e27d6ca9 | |
| parent | feat: drop rust nightly requirement!!! (diff) | |
| download | windmark-c7d48a8c693645d4af45f530a52ebbe570649e1c.tar.xz windmark-c7d48a8c693645d4af45f530a52ebbe570649e1c.zip | |
docs(README.md): update outdated readme
| -rw-r--r-- | README.md | 9 | ||||
| -rw-r--r-- | src/lib.rs | 1 |
2 files changed, 7 insertions, 3 deletions
@@ -9,7 +9,10 @@ the modern age! ## Usage -### Add Windmark as a dependency +Check out an example starter project +[here](https://github.com/gemrest/windmark-starter-project]! + +### Add Windmark and Tokio as Dependencies ```toml # Cargo.toml @@ -34,10 +37,10 @@ tokio = { version = "0.2.4", features = ["full"] } use windmark::Response; #[windmark::main] -fn main() -> Result<(), Box<dyn std::error::Error>> { +async fn main() -> Result<(), Box<dyn std::error::Error>> { windmark::Router::new() .set_private_key_file("windmark_private.pem") - .set_certificate_chain_file("windmark_public.pem") + .set_certificate_file("windmark_public.pem") .mount("/", Box::new(|_| Response::Success("Hello, World!".into()))) .set_error_handler(Box::new(|_| { Response::PermanentFailure("This route does not exist!".into()) @@ -44,3 +44,4 @@ pub use module::Module; pub use response::Response; pub use router::Router; pub use tokio::main; + |