Skip to content
Snippets Groups Projects

node_config -> CONFIG -> config.js -> config

Merged Jure requested to merge config into master
Compare and Show latest version
1 file
+ 0
23
Compare changes
  • Side-by-side
  • Inline
+ 0
23
// const pickBy = require('lodash/pickBy')
const fs = require('fs')
const path = require('path')
module.exports = function (env) {
let config = fs.readFileSync(path.resolve(__dirname, '..', 'config', `${env}.js`), 'utf8')
console.log(config)
return {'why': 'not', 'pubsweet-client': {theme: 'pepper'}}
}
// // Config is JSON friendly except for the authsome configuration
// let config = require('config')
// // Some filtering so that secrets don't leak
// config = pickBy(config, (value, key) => {
// return ['pubsweet-client', 'validations', 'pubsweet', 'authsome'].includes(key)
// })
// console.log(config)
// let config =
// module.exports = config