Created
September 13, 2016 08:32
-
-
Save fedor/a1b9aef659963a062785fd559da4299e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// config.js | |
module.exports = { | |
mongo: { | |
init: function (params) { | |
return require('mongodb').MongoClient.connect( | |
'mongodb://'+params.host+':'+params.port+'/'+params.db | |
) | |
}, | |
default: { | |
db: 'test', | |
port: 27017 | |
}, | |
development: { | |
host: '127.0.0.1' | |
}, | |
production: { | |
db: 'prod', | |
host: '192.168.0.10' | |
} | |
}, | |
redis: { | |
init: function (params) { | |
return require('redis').createClient(params) | |
}, | |
default: { | |
port: 6379 | |
}, | |
development: { | |
host: '127.0.0.1' | |
}, | |
production: { | |
host: '192.168.0.11' | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment