Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use replicaset if configured #3091

Merged
merged 3 commits into from Apr 28, 2015
Merged

use replicaset if configured #3091

merged 3 commits into from Apr 28, 2015

Conversation

@Icehunter
Copy link
Contributor

Icehunter commented Apr 25, 2015

I use a replicaset. Here's a patch to use as well.

config.json:

{
    "url": "http://localhost:4567",
    "secret": "fae93eb7-f17b-429d-a614-4783d8466517",
    "database": "mongo",
    "mongo": {
        "host": "127.0.0.1,127.0.0.1,127.0.0.1",
        "port": "27017,27018,27019",
        "username": "",
        "password": "",
        "database": "nodebb"
    }
}
Icehunter added 2 commits Apr 25, 2015
Signed-off-by: Ryan Wilson <syndicated.life@gmail.com>
Signed-off-by: Ryan Wilson <syndicated.life@gmail.com>
@julianlam

This comment has been minimized.

Copy link
Member

julianlam commented Apr 27, 2015

Hi @Icehunter, please sign the Contributor Assignment Agreement, so we can take a look at this PR 😄

@Icehunter

This comment has been minimized.

Copy link
Contributor Author

Icehunter commented Apr 27, 2015

Done :)


for (var i = 0; i < hosts.length; i++) {
servers.push(hosts[i] + ':' + ports[i]);
}

This comment has been minimized.

Copy link
@barisusakli

barisusakli Apr 27, 2015

Member

Indentation issue here. We use tabs 👼
Other than that this looks good.

barisusakli added a commit that referenced this pull request Apr 28, 2015
use replicaset if configured
@barisusakli barisusakli merged commit 3b93182 into NodeBB:master Apr 28, 2015
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@garyx

This comment has been minimized.

Copy link

garyx commented Nov 17, 2016

I just want to add that with the 1.3 upgrade you now have to specify the replicaset, we had to change the database line like this for it to work.
"database": "nodebb?replicaSet=replicaname"
Instead of
"database": "nodebb"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.