how to use production d1 db in local

hi folks, i'm new to db world i have my d1 database defined in format on my wrangler.toml file.
[[d1_databases]]
binding = "CB_DB" # i.e. available in your Worker on env.DB
database_name = "cherry-blossom"
database_id = db id here
[[d1_databases]]
binding = "CB_DB" # i.e. available in your Worker on env.DB
database_name = "cherry-blossom"
database_id = db id here
I'm able to use it on deployed link but when on local host. when i query using d1 syntax or even drizzle, i get error D1_ERROR: no such table: products: SQLITE_ERROR is there a workaround for it?
2 Replies
Hard@Work
Hard@Work3d ago
Pages does not support remote bindings
Zeeshan
Zeeshan3d ago
what does that mean? asking because i'm able to fetch on a deployed url but not on local host. for context i'm using d1 with astro with the help of cloudflare adapter, so i'm able to use Astro.locals.runtime.env.CB_DB
Want results from more Discord servers?
Add your server