aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md10
1 files changed, 5 insertions, 5 deletions
diff --git a/README.md b/README.md
index af48bba..99cbacf 100644
--- a/README.md
+++ b/README.md
@@ -53,16 +53,16 @@ tokio = { version = "1.26.0", features = ["full"] }
```rust
// src/main.rs
-// ...
+use windmark::response::Response;
#[windmark::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
windmark::router::Router::new()
.set_private_key_file("windmark_private.pem")
.set_certificate_file("windmark_public.pem")
- .mount("/", windmark::success!("Hello, World!"))
+ .mount("/", |_| Response::success("Hello, World!"))
.set_error_handler(|_|
- windmark::response::Response::permanent_failure("This route does not exist!")
+ Response::permanent_failure("This route does not exist!")
)
.run()
.await
@@ -74,14 +74,14 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
```rust
// src/main.rs
-// ...
+use windmark::response::Response;
#[rossweisse::router]
struct Router;
#[rossweisse::router]
impl Router {
- #[route(index)]
+ #[rossweisse::route(index)]
pub fn index(
_context: windmark::context::RouteContext,
) -> Response {