1
When we want to hide some personal data in the back end we use the file .env
, and then retrieves this information using process.env.[KEY_NAME]
, but that only works in the back end because as the dotenv
is a module of Node
the browser cannot run...
So how do I protect data that I would like to keep private on the front end? I am trying to hide my API_KEY
, I need to make a request for an API like http://url&appid=[MINHA_API_KEY]
, there is some simple way to hide and retrieve this key as the .env
back-end? It’s just that I don’t want that key to go to the github
, nor is it visible to the user through developers tools
browser...