How do I set environment variables?


How do I set environment variables? I don’t see the setting for it anywhere. And would other users who visit my project see my keys?


You set them inside your .env file, for example:


Then you can use them in your code like this:


And no, if someone views your code without being invited to edit it, they will not see the content of your environment variables, just their names. And if they remix your project, similarly, the values will be blank.


I did exactly what you suggested.

script.js:11 Uncaught ReferenceError: process is not defined
    at script.js:11

and it did not work. Please help at!/nasamix?path=script.js:12:0


You can’t use it on the client-side, it’s server-side only, and you wouldn’t want to because then your secrets will show up in your visitors’ browsers for all to see.