How do I set environment variables?


#1

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?


#2

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

HELLO='world'

Then you can use them in your code like this:

process.env.HELLO

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.