environment variables return undefined when i deploy
Hi. i'm trying to deploy my app locally but in the terminal where i'm logging the variables are returning undefined
in wrangler i have the variables like this
i'm logging the envoirment variables like this
can anyone help me with this. am i doing something wrong?
these are the commands in package.json & i'm executing this one ->
"deploy:worker": "npm run build:worker && wrangler deploy"
2 Replies
@Rohil use .dev.vars in the local development
Cloudflare Docs
Environment variables · Cloudflare Workers docs
Environment variables are a type of binding that allow you to attach text strings or JSON values to your Worker