feat: Heroku support - setup

This commit is contained in:
NGPixel
2017-05-14 20:17:08 -04:00
parent 6e0b7dc272
commit 451b2a646f
7 changed files with 215 additions and 20 deletions

20
server/helpers/config.js Normal file
View File

@@ -0,0 +1,20 @@
'use strict'
const _ = require('lodash')
module.exports = {
/**
* Parse configuration value for environment vars
*
* @param {any} cfg Configuration value
* @returns Parse configuration value
*/
parseConfigValue (cfg) {
return _.replace(
cfg,
(/\$\([A-Z0-9_]+\)/g,
(m) => { return process.env[m] })
)
}
}