rehandalal / node-env-settings

Multi-environment configuration made simple

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

node-env-settings

Travis Coveralls github npm

node-env-settings is a utility library to make reading Node.js application settings from environment variables easier.

It was heavily inspired by django-configurations.

Quickstart

Install node-env-settings:

npm install node-env-settings

Create a new Settings object to read settings from the environment variables:

// settings.js

import { Settings, values } from 'node-env-settings';

export default new Settings({
  DEBUG: values.BooleanValue(false),
  MY_SETTING: values.Value('default value'),
}, 'REACT_APP');

This will attempt to read REACT_APP_DEBUG and REACT_APP_MY_SETTING from your environment variables.

About

Multi-environment configuration made simple

License:Mozilla Public License 2.0


Languages

Language:JavaScript 100.0%