rampatra
rampatra
CDCloudflare Developers
Created by rampatra on 6/26/2024 in #d1-database
I am trying to follow the instructions
Also, for previewing the app locally, the doc says to run this npx wrangler pages dev .vercel/output/static However, the normal npm run dev worked fine for me. I was able to interact with the db with no problems.
9 replies
CDCloudflare Developers
Created by rampatra on 6/26/2024 in #d1-database
I am trying to follow the instructions
Tnx for the help!
9 replies
CDCloudflare Developers
Created by rampatra on 6/26/2024 in #d1-database
I am trying to follow the instructions
awesome, this finally worked. Minor comment to improve the doc a bit. This doesn't say how to declare the DB type clearly. I got this error Type error: Property 'DB' does not exist on type 'CloudflareEnv' initially but I got past it eventually.
9 replies
CDCloudflare Developers
Created by rampatra on 6/26/2024 in #d1-database
I am trying to follow the instructions
One approach can be -- have a standalone app generated via wrangler and deploy it as a separate worker on cloudflare and have all the db logic there exposing the same as APIs. And, my nextjs app (a different worker on cloudflare) can then interact with the db via this wrangler generated standalone project. However, I will still prefer to have everything inside my one nextjs app.
9 replies
CDCloudflare Developers
Created by rampatra on 6/26/2024 in #d1-database
I am trying to follow the instructions
This page does talk about bindings and shares basic typescript code for interacting with the database, however, it doesn't share any info about the use of d1 db within a nextjs app. So, do you have some reference or doc showing this?
9 replies
CDCloudflare Developers
Created by rampatra on 6/26/2024 in #d1-database
I am trying to follow the instructions
thanks, let me try and follow the steps mentioned here.
9 replies