Ok, I might aswell consider removing the blog but it's a main feature. Thank you for your feedback o
Ok, I might aswell consider removing the blog but it's a main feature. Thank you for your feedback on this

compatibility_flags = ["nodejs_compat"] in wrangler.toml but on publish, the deployed result says it must be enabled from dashgetRequestContext from a next handler for local dev
getRequestContext utility in the edge runtime?process.env and it worked actuallyprocess.env works getRequestContext should work as well export const runtime = "edge";process.env worked without it somehowprocess.env you had used the same variable name for something else? .env into process.env.env too
import { ImageResponse } from 'next/og'
import Image from 'next/image'
// Route segment config
export const runtime = 'edge'
// Image metadata
export const size = {
width: 32,
height: 32,
}
export const contentType = 'image/png'
// Image generation
export default function Icon() {
return new ImageResponse(
(
// ImageResponse JSX element
<Image height={size.height} width={size.width} src="/favicons/apple-icon-180x180.png" alt="PurpleHosting - Icon" />
),
// ImageResponse options
{
// For convenience, we can re-use the exported icons size metadata
// config to also set the ImageResponse's width and height.
...size,
}
)
}export async function GET(request: NextRequest) {
const db = drizzle(process.env.DB);
console.log("DB", db)
const customers = await db.select().from(users).all()
return new Response(JSON.stringify(customers), {
headers: { "Content-Type": "application/json" },
});
}import { setupDevPlatform } from "@cloudflare/next-on-pages/next-dev";
if (process.env.NODE_ENV === "development") {
await setupDevPlatform({});
}