Dhravya / cloudflare-saas-stack

Quickly make and deploy full-stack apps with database, auth, styling, storage etc. figured out for you. Add all primitives you want.
3.09k stars 231 forks source link

A Monorepo Cloudflare Template #54

Closed Abood2284 closed 1 week ago

Abood2284 commented 1 week ago

Thank you @Dhravya for open sourcing supermemory i got to learn soo much from it,

i was exploring turbo repo and i just knew that you are the guy for this, as supermemory is built on this.

by any chance you have a cloudflare stack template that also supports turbo repo? ( i know you did have in the beginning, unable to find now)

Dhravya commented 1 week ago

hi! Yes, if you go through the repo history you will find the turbo repo implementation. i removed it for further simplicity.

Abood2284 commented 1 week ago

Thank you found it.

I use monorepo to manage my NextJs app and Worker app and host it on cloudflare pages.

I tend to use D1 with both Nextjs and Cloudflare worker

But when running on local, using run dev command

both fires up their local SQL D1 file

Nextjs creates its own .wrangler folder while worker creates its own .wrangler folder

I even tried approaches like --persist-to. command it still fails to find the table and just return

/500 error TypeError: Cannot read properties of undefined (reading 'prepare')

How to test and wortk with same D1 Database on Local Environment

Do you have any idea brother, you are only person i could come up.