Environment Variables
Environment variables are dynamic values that are set outside of the main program and are used by various processes running on the SDK. These variables contain information about the system environment, such as the SHIMOKU_TOKEN
, the UNIVERSE_ID
or the WORKSPACE_ID
, that are specific for every user and must not be shared.
Using a .env
file, the values of the variables can be stored, and using a .gitignore
file, the git processes will ignore them, thus will not publish them.
When creating a project in the SDK you will encounter a code similar to this:
The getenv()
function returns the value of the variable stored in the .env
file, indicated in the parameters:
To access these credentials, log into your account on Shimoku.io, click on the top-right corner User Icon and then on Settings > Information For Developers.
If you do not have an account, check Shimoku Cloud
Finally, to ensure that none of this values can be published when using git tools, create a .gitignore
file and add the .env
file:
Last updated