Skip to content

Latest commit

 

History

History
35 lines (28 loc) · 583 Bytes

Firebase-cheatsheet.md

File metadata and controls

35 lines (28 loc) · 583 Bytes

Firebase Cheatsheet

Functions

set

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

get in shell

firebase functions:config:get
# {
#   "someservice": {
#     "key":"THE API KEY",
#     "id":"THE CLIENT ID"
#   }
# }

get in js

const functions = require('firebase-functions');
console.log(functions.config().someservice.key);

dump to local (for run emulator)

firebase functions:config:get > .runtimeconfig.json