Cloudflare Worker with Hono + D1 + D1-ORM
Hello all, I am new to this thing and need some help. Currently, I've successfully setup worker with Hono + D1. Now I want to use D1-ORM (https://github.com/Interactions-as-a-Service/d1-orm) but don't know how to pass env.DB which is declared inside hono context like this:
I've got
When I run
Can anyone help me figure out how to properly pass env.DB to the model?
Thanks in advance.
I've got
./src/Models/Customer.js file which contains this:When I run
wrangler dev I'm getting error:Can anyone help me figure out how to properly pass env.DB to the model?
Thanks in advance.