Skip to content

Instantly share code, notes, and snippets.

@luislobo
Last active August 29, 2015 14:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save luislobo/5ebcf2e44ee517803ea2 to your computer and use it in GitHub Desktop.
Save luislobo/5ebcf2e44ee517803ea2 to your computer and use it in GitHub Desktop.
SailsJS DB config for replica set
module.exports.connections = {
yourDB: {
host: 'mongodb02.prod.whatever.com',
port: 27017,
database: 'somedb',
schema : true,
replSet: {
servers: [
{
host: 'mongodb01.prod.whatever.com'
},
{
host: 'mongodb03.prod.whatever.com'
}
],
options: {}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment