Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

store environment variables firebase

$ cd project_directory
$ cd functions
$ firebase functions:config:set api_key1="YOUR_API_KEY1" api_key2="YOUR_API_KEY2"

// Accessing the Keys in Code

const functions = require('firebase-functions');

const api_key1  = functions.config().api_key1;
const api_key2  = functions.config().api_key2;
Source by dev.to #
 
PREVIOUS NEXT
Tagged: #store #environment #variables #firebase
ADD COMMENT
Topic
Name
5+6 =