Skip to content

to set firebase environment variables through firebase config:set commands from .env

Notifications You must be signed in to change notification settings

MOCHI-inc-JAPAN/firebase-auto-env

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Automatic conversion .env file to firebase key value arguments and deployment of env variables.

Usage

add package.json devDependencies.

  "firebase-auto-env": "github:MOCHI-inc-JAPAN/firebase-auto-env#v1.0.0"

and run

npx faenv [$pathOfEnvFile, $firebaseEnvironmentPrimaryNameSpace]

Options

  • $pathOfEnvFile: (default: .env)
  • $firebaseEnvironmentPrimaryNameSpace: (default: name field in package.json)

Example

in .env

EXAMPLE_TEST_KEY=test
EXAMPLE_TEST_VALUE=test
node ./bin/index.js .env hosting

# runs
firebase functions:config:set hosting.example_test_key=test hosting.example_test_value=test

About

to set firebase environment variables through firebase config:set commands from .env

Resources

Stars

Watchers

Forks

Packages

No packages published