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

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.