'How to get Digitalocean environment variable?
I set an environment variable in Digitalocean with token, but I don't understand how to use it in the code. I scrolled through the docs, but didn't get anything. Can you please tell which path I should write or anything else what I should do?
Solution 1:[1]
I would suggest using an environment function in your language of choice that searches the .env file or current global env and pull the variable that is available.
Example: for R, I can use Sys.getenv("MY_SECRET")
to pull the variable from DO.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | JJ Fantini |