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


#1

Original Thread: https://skygear.slack.com/archives/C1AD5Q51R/p1514982905000160

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


#2

@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