hi all, i'm developing a worker that has

hi all, i'm developing a worker that has access to D1 databases through D1 database bindings (set as variables under D1 Database Bindings). how am i able to reach those databases when i'm developing locally? using queries like this: {results} = await env.IRADB.prepare(<here goes the query>).bind(<binds>).run();
1 Reply
dpkp
dpkp4w ago
yes, that should work when running under wrangler dev . But you do have to apply the db migrations locally first: wrangler d1 migrations apply --local <database>