Requires a yaml or json config file depending on what it finds.
npm install --save yaml-or-json
var yamlOrJSON = require('yaml-or-json');
var config = yamlOrJSON(__dirname + '/config/my-config');
console.log(config.someProperty);
This will read and parse my-config.yaml
or my-config.yml
or my-config.json
from the config
directory, depending which file will be there.
JSON files are parsed by JSON5 parser.
MIT © Zoltan Kochan