4

According to Firebase documentation, environment configs can be set by running the command:

firebase functions:config:set someservice.key="THE API KEY" someservice.id="THE CLIENT ID"

However, I am wondering is there a way to import environment configs from a file e.g. from a JSON file configs.json:

firebase functions:config:set configs.json
Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
Derek
  • 655
  • 1
  • 8
  • 9
  • 2
    There is not. You could write your own program to read the json and convert that into a series of firebase CLI commands that get the job done. – Doug Stevenson Jul 14 '17 at 12:24
  • Sounds like an answer Doug! :) – Frank van Puffelen Jul 14 '17 at 14:07
  • tthanks ... I tried . firebase functions:config:set service_account="$(cat service-account.json)" . and I get all parameters ... checked with firebase functions:config:get service_key so it's definitely an answer ... answer it and I'll vote ... –  May 08 '18 at 07:55
  • forgot to menton that in order to testv locally ...with firebase serve , then I MUST run before . firebase functions:config:get > .runtimeconfig.json ... as unctions.config() is only available within the Cloud Functions runtime –  May 08 '18 at 08:21

0 Answers0