Open polRk opened 1 year ago
One alternative is to use the miniflare node packages for local development. For example.
import { D1Database, D1DatabaseAPI } from "@miniflare/d1";
import { createSQLiteDB } from "@miniflare/shared";
const sqliteDb = await createSQLiteDB("path/to/your.sqlite3"); // Or `createSQLiteDB(":memory:");` for an in-memory database.
const d1 = new D1Database(new D1DatabaseAPI(sqliteDb));
const data = await d1.prepare('select * from table').all();
this should be in the docs
@PatrickJS isn't the cloudflare adapter working through wrangler etc.? We can close this issue if the current cloudflare adapter answers these use-cases.
Is your feature request related to a problem?
For now, i cannot access cloudflare kv, d1, do, services, any cloudflare infrastructure services. Because my script do not run on cloudflare (start or dev script run vite, but not wrnagler or miniflare)
Describe the solution you'd like
Modify starter template and add support for running via wrangler or miniflare
Describe alternatives you've considered
no
Additional context
No response