@nukr/multiconfig
v0.1.7
Published
multiconfig for node
Downloads
4
Readme
node-multiconfig
inspire by multiconfig
No more process.env for your config
Install
npm install @nukr/multiconfig --save
Usage
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'
}
})