Tommy
Tommy2mo ago

Referencing environment variables from .env in deno compile or deno task commands

Is this possible? I can reference predefined env variables like PATH fine, but any env variables that are defined in .env seems out of reach by the Deno CLI.
2 Replies
Bhuwan
Bhuwan2mo ago
You can use —env-file —allow-env along with your deno command, this by default uses .env file but if it’s named different you can use —env-file=.env.prod —allow-env, hope this helps.
Tommy
TommyOP2mo ago
I tried this already but my environment variables turn out undefined

Did you find this page helpful?