0.2.3 • Published 5 years ago
node-properties v0.2.3
node-properties
Extremely flexible, no-hassle configuration for nodejs applications.
Install
npm i node-properties
Usage
defaults.yaml
user:
name: John
index.js
import {config} from 'node-properties';
const name = config.get('user.name');
console.log(`Hello ${name}!`);
// Output: Hello John!
Sources
By default, properties are retrieved in the following order:
- Command line parameters
- Environment variables
config/${NODE_ENV}
(.yaml, .json, or .env)config/defaults
(.yaml, .json, or .env)