|
|
@ -31,9 +31,13 @@ module.exports = (confPaths) => {
|
|
|
|
let appdata = {}
|
|
|
|
let appdata = {}
|
|
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
appconfig = yaml.safeLoad(_.deepMap(fs.readFileSync(confPaths.config, 'utf8'), c => {
|
|
|
|
appconfig = yaml.safeLoad(
|
|
|
|
return _.replace(c, (/\$\([A-Z0-9_]+\)/g, (m) => { return process.env[m] }))
|
|
|
|
_.replace(
|
|
|
|
}))
|
|
|
|
fs.readFileSync(confPaths.config, 'utf8'),
|
|
|
|
|
|
|
|
(/\$\([A-Z0-9_]+\)/g,
|
|
|
|
|
|
|
|
(m) => { return process.env[m] })
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
)
|
|
|
|
appdata = yaml.safeLoad(fs.readFileSync(confPaths.data, 'utf8'))
|
|
|
|
appdata = yaml.safeLoad(fs.readFileSync(confPaths.data, 'utf8'))
|
|
|
|
appdata.regex = require(confPaths.dataRegex)
|
|
|
|
appdata.regex = require(confPaths.dataRegex)
|
|
|
|
} catch (ex) {
|
|
|
|
} catch (ex) {
|
|
|
|