Skip to content

Commit

Permalink
chore: changeset
Browse files Browse the repository at this point in the history
  • Loading branch information
sor4chi committed Dec 3, 2023
1 parent fa4166d commit 7c0bf23
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .changeset/clean-seals-flash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
"hono-do": minor
---

feat: enable to get bindings env from vars

```ts
import { generateHonoObject } from "hono-do";

type Env = {
Bindings: {
KV: KVNamespace
};
}

export const Batcher = generateHonoObject<Env>("/", async (app, state, vars) => {
vars.env.KV // KVNamespace
})
```
6 changes: 6 additions & 0 deletions examples/batcher/wrangler.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,9 @@ bindings = [{ name = "BATCHER", class_name = "Batcher" }]
[[migrations]]
tag = "v1"
new_classes = ["Batcher"]

[[d1_databases]]
binding = "DB"
database_name = "batch-db"
database_id = "ae9d3bb9-d843-4fab-9387-7aed0ad5b92b"
preview_database_id = "DB"

0 comments on commit 7c0bf23

Please sign in to comment.