Can I use environment variable to pass config to Cloud Functions?


Original Thread:

Hi @bencheng, am I able to store global variables somewhere in my skyGear dashboard that can be changed easily or is it best to store these variable in a DB table? Can I add any environment variable or does it have to be in the ‘All Environment Variable’ list? If I can just add a new one, how can I fetch that value using typescript? Thanks


@Trevor Hicks yes, you can save some configuration variables in the environment variable dashboard in Skygear Portal.

You can fetch the value from process.env