Skip to content

Commit

Permalink
0.18.1 -> 0.18.2 & Update README (#154)
Browse files Browse the repository at this point in the history
  • Loading branch information
kanarus authored May 4, 2024
1 parent 8645805 commit caa5f30
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 25 deletions.
27 changes: 3 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,12 @@ Hello, your_name!
<br>

## 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
Expand All @@ -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 )

<br>

Expand Down
2 changes: 1 addition & 1 deletion ohkami/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ohkami"
version = "0.18.1"
version = "0.18.2"
edition = "2021"
authors = ["kanarus <[email protected]>"]
description = "Build web app in intuitive and declarative code"
Expand Down

0 comments on commit caa5f30

Please sign in to comment.