node-properties
Extremely flexible, no-hassle configuration for nodejs applications.
Install
npm i node-properties
Usage
defaults.yaml
user: name: John
index.js
; ;console.log`Hello !`; // 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)