0.2.3 • Published 6 years ago
node-properties v0.2.3
node-properties
Extremely flexible, no-hassle configuration for nodejs applications.
Install
npm i node-propertiesUsage
defaults.yaml
user:
name: Johnindex.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)