node-env-settings
v0.1.2
Published
Multi-environment configuration made simple
Downloads
8
Readme
node-env-settings
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.