Magnus
Magnus
SSolidJS
Created by slowpoke on 3/4/2024 in #support
SolidStart - Nitro Module missing `context` keys in `request`
I have the same problem as you, I can´t access Cloudflare bindings in dev mode. I have also tried "nitro-cloudflare-dev", but the plugin does not run. Maybe plugins are not supported yet? Did you find a solution to this? Using getPlatformProxy() like in this example https://developers.cloudflare.com/workers/wrangler/api/#usage-1 does give access to the bindings.
import { getPlatformProxy } from "wrangler";

const { env } = await getPlatformProxy();
console.log(`MY_VARIABLE = ${env.MY_VARIABLE}`);
import { getPlatformProxy } from "wrangler";

const { env } = await getPlatformProxy();
console.log(`MY_VARIABLE = ${env.MY_VARIABLE}`);
2 replies