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

Readme

Keywords

none

Package Sidebar

Install

npm i figaro-js

Weekly Downloads

84

Version

3.0.2

License

MIT

Unpacked Size

11 kB

Total Files

13

Last publish

Collaborators

  • dpikt