-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Closed
Labels
content:editRequest for content editsRequest for content editsdocumentationDocumentation editsDocumentation editsproduct:d1D1: https://developers.cloudflare.com/d1/D1: https://developers.cloudflare.com/d1/
Description
Existing documentation URL(s)
Doc link - https://developers.cloudflare.com/d1/get-started/
This page lists nicely the steps when creating a worker from scratch but what if someone already has a worker defined and set up and are adding the D1 database to it. What node dependency to add, etc. can be mentioned.
For example, I have a nextjs app set up already and I want to add D1 database to it. So, how shall I do that?
Currently, the below is giving me an error (D1Database not found):
export interface Env {
// If you set another name in wrangler.toml as the value for 'binding',
// replace "DB" with the variable name you defined.
DB: D1Database;
}
I ran this too npm install @cloudflare/workers-types @cloudflare/d1 but no luck.
What changes are you suggesting?
It should contain steps to do for existing worker.
Additional information
No response
usrrname
Metadata
Metadata
Labels
content:editRequest for content editsRequest for content editsdocumentationDocumentation editsDocumentation editsproduct:d1D1: https://developers.cloudflare.com/d1/D1: https://developers.cloudflare.com/d1/