Cloudflare d1 on cloudflare pages functions
In the drizzle docs, the following code is mentioned to work with cloudflare workers but how do I make it work for cloudflare pages functions
I also need to export a singleton db instance from it to pass it to my better-auth instance, how do i make it work?
1 Reply
I'm trying to do what you're doing. I think you export a function that returns an instance instead of a singleton. And create the singleton on the fly in hooks/middleware