Skip to content

Latest commit

 

History

History
51 lines (30 loc) · 993 Bytes

README.md

File metadata and controls

51 lines (30 loc) · 993 Bytes

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