I would hope that you aren't billed for multicore ops because they are an implementation detail?
I would hope that you aren't billed for multicore ops because they are an implementation detail?


wrangler pages deploy .vercel/output/static

getRequestContext() and process.env is still very confusing. sometimes they work in local, sometimes they dont work in prod, so i made this utility functiongetRequestContext() and process.env should with next dev, wrangler pages dev and productiongetRequestContext())
.envwrangler pages deploy .vercel/output/static "logs": [
{
"message": [
"Failed to Send Email:",
"[object Object]"
],
"level": "error",
"timestamp": 1712562394309
}
],process.envprocess.envimport 'server-only'
export function getEnv(): Env {
const grc = getRequestContext().env as unknown as Env;
if (grc.SECRET_KEY != null) {
return grc;
} else if (process.env.SECRET_KEY != null) {
return process.env as unknown as Env;
} else {
throw new Error("Env variables are not defined");
}
}