Tommy
Tommy6d 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
Bhuwan6d 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
TommyOP2d ago
I tried this already but my environment variables turn out undefined