inspire by multiconfig
No more process.env for your config
npm install @nukr/multiconfig --save
before
export default {
app: {
port: process.env.APP_PORT || 3000
},
rethinkdb: {
host: process.env.RETHINKDB_HOST || 'localhost',
port: process.env.RETHINKDB_PORT || 28015
},
es: {
host: process.env.ES_HOST || 'localhost:9200'
}
}
after
import multiconfig from '@nukr/multiconfig'
export default multiconfig({
app: {
port: 3000
},
rethinkdb: {
host: 'localhost',
port: 28015
},
es: {
host: 'localhost:9200'
}
})