npm

Need private packages and team management tools?Check out npm Orgs. »

figaro-js

3.0.2 • Public • Published

npm version Build Status

figaro-js

This package emulates the behavior of figaro for rails. It loads environment variables from an application.yml file into process.env.

Quickstart

In ./config/application.yml:

SOME_VAR: 'FOO'
 
development:
  IS_DEV: true
 
production:
  IS_PROD: true

In your start script:

 
const Figaro = require('figaro-js')
 
Figaro.load()
 
console.log(process.env.SOME_VAR) // -> 'FOO'
 

Using ES6 syntax:

 
import * as Figaro from 'figaro-js'
 
Figaro.load()
 
console.log(process.env.SOME_VAR) // -> 'FOO'
 

Documentation

Full module API and usage info can be found in docs.md.

Migration Guides

Keywords

none

install

npm i figaro-js

Downloadsweekly downloads

105

version

3.0.2

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
Report a vulnerability