How do I access text stored in the .env file?

I know that you have to do this:
process.env.[secret variable name]
but I didn’t work. What language does it work in? Can it work with javascript? Sorry but I am new to it, thanks for your help.

Hey @Timothy,

The env values are only accessible from server-side code, like Node.js and cannot be accessed from a frontend JavaScript file.

6 Likes