Load rc files.
Compared to other rc file loaders, this one is more focused. It does not load from cli flags, and does not support anything other than ini format.
$ npm i readinirc
const rc = require('rc-ini')
rc('my-app', (err, conf, files) => {
if (err) {
throw err
}
// Files which were loaded
console.log(files)
// The configuration itself
console.log(conf)
})
$ inirc help
inirc [command] [opts]
Commands:
inirc show [name] print config
inirc files [name] print config files
inirc help [default]
Options:
--help Show help [boolean]
--version Show version number [boolean]
--cwd, -D Directory [default: "."]
--home, -h Home [default: "/Users/username"]
--etc, -e Etc [default: "/etc"]