aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFuwn <[email protected]>2022-07-31 18:44:07 +0000
committerFuwn <[email protected]>2022-07-31 18:44:07 +0000
commitc7d48a8c693645d4af45f530a52ebbe570649e1c (patch)
tree74005c2df212f9d49ab4cf558a182ba5e27d6ca9
parentfeat: drop rust nightly requirement!!! (diff)
downloadwindmark-c7d48a8c693645d4af45f530a52ebbe570649e1c.tar.xz
windmark-c7d48a8c693645d4af45f530a52ebbe570649e1c.zip
docs(README.md): update outdated readme
-rw-r--r--README.md9
-rw-r--r--src/lib.rs1
2 files changed, 7 insertions, 3 deletions
diff --git a/README.md b/README.md
index 4f0290a..9a7a257 100644
--- a/README.md
+++ b/README.md
@@ -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())
diff --git a/src/lib.rs b/src/lib.rs
index 642182c..4b01f02 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -44,3 +44,4 @@ pub use module::Module;
pub use response::Response;
pub use router::Router;
pub use tokio::main;
+