New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
馃捑 Support D1 #277
Comments
I'm trying miniflare with a project (
Is this expected? 馃檹 My
|
Hey! 馃憢 Happy new year! Just catching up on issues now. 馃檪 |
Hey :), happy new year, thanks for your reply. My attempt at using Miniflare is in I was using It works fine with
|
Hey! The problem here is that Miniflare doesn't support using string arrays for Miniflare does have the non-standard [miniflare]
build_watch_dirs = ["rust/src", "src"] to the bottom of your |
That works! Thanks for your help and explanation @mrbbot. 馃馃檹 . I could even delete the following code, which means I don't need to edit wrangler.toml when switching between wrangler and miniflare:
For anyone interested, the changes I made is shown in ben-xD/bounding_box_annotation_flutter@e49d85d |
Hi! I'm getting the same log message FYI I'm injecting miniflare inside a SvelteKit application, so I'm using some javascript code like: import { Miniflare, Log, LogLevel } from "miniflare"
import { dev } from "$app/environment"
export const fallBackPlatformToMiniFlareInDev = async (_platform: App.Platform) => {
if (!dev || _platform)
return _platform
const mf = new Miniflare({
log: new Log(LogLevel.INFO),
d1Persist: "./data/d1/",
d1Databases: ["D1_CLOUDFLARE_EXAMPLE_APPLICATION"],
globalAsyncIO: true,
globalTimers: true,
globalRandom: true,
script: `
addEventListener("fetch", (event) => {
event.waitUntil(Promise.resolve(event.request.url));
event.respondWith(new Response(event.request.headers.get("X-Message")));
});
addEventListener("scheduled", (event) => {
event.waitUntil(Promise.resolve(event.scheduledTime));
});
`
})
const env = await mf.getBindings()
const platform: App.Platform = { env }
return platform
} It is not clear to me how I should proceed in this case, as I don't have a |
Just starting to use miniflare with D1 and getting the same warning as @trenta3 Why is it a requirement for us to name our databases this way? Is there a way to get around it? |
@mrbbot Are there plans to remove the DB name check? It doesn't seem to make much sense any more. |
https://blog.cloudflare.com/introducing-d1/
The text was updated successfully, but these errors were encountered: