diff --git a/README.md b/README.md index 55cf03a8..0628cf25 100644 --- a/README.md +++ b/README.md @@ -67,13 +67,12 @@ Hello, your_name!
## Cloudflare Workers is supported by `rt_worker` feature -You can easily write Ohkami app and deploy it to Cloudflare Workers : ```sh npm create cloudflare ./path/to/project -- --template https://github.com/kana-rus/ohkami-templates/worker ``` -Then your `project` has `wrangler.toml`, `package.json` and +Then your `project` has `wrangler.toml`, `package.json` and `src/lib.rs` with `Cargo.toml` ```toml @@ -84,29 +83,9 @@ ohkami = { version = "0.18", features = ["rt_worker"] } worker = { version = "0.2.0" } ``` -`src/lib.rs` -```rust,ignore -use ohkami::prelude::*; - -#[ohkami::bindings] -struct Bindings; - -#[ohkami::worker] -async fn my_worker() -> Ohkami { - #[cfg(feature = "DEBUG")] - console_error_panic_hook::set_once(); +Local dev by `npm run dev` and depoly by `npm run deploy` ! - Ohkami::new(( - "/".GET(|| async {"Hello, world!"}), - )) -} -``` - -You can deploy by : - -```sh -npm run deploy -``` +( See README of the [template](https://github.com/kana-rus/ohkami-templates/tree/main/worker) for details )
diff --git a/ohkami/Cargo.toml b/ohkami/Cargo.toml index 8d00da46..09117e90 100644 --- a/ohkami/Cargo.toml +++ b/ohkami/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ohkami" -version = "0.18.1" +version = "0.18.2" edition = "2021" authors = ["kanarus "] description = "Build web app in intuitive and declarative code"