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.
On this page
Languages
JavaScript100.0%
Contributors
Mozilla Public License 2.0
Created July 7, 2018
Updated January 28, 2023