Sharing a D1 Database in a monorepo
I am building a project that has a public facing React Router app, a backoffice app and a background worker service. All of them built on Workers. All of these should have the ability to access a D1 database for various business logic. I thought about having a shared package that handles the db logic. However, not sure how this would work with local emulation of D1?
I am also thinking that I am overcomplicating this and exposing API endpoints in the background worker would be the best solution...
0 Replies