Skip to content
This repository was archived by the owner on Aug 6, 2021. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions tutorials/mongo.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,20 @@ To use MongoDB in your Node.js/Sails app during development:

That's it! Lift your app again and you should be good to go.

### Connecting to replica set

In your `config/datastores.js` file, edit the `default` datastore configuration:

```js
default: {
adapter: 'sails-mongo',
url: 'mongodb://user:pwd@host1.com:27017,host2.com:27017,host3.com:27017/foo?retryWrites=true&w=majority',
ssl: true,
replicaSet: 'mongo-shard-0',
authSource: 'admin',
}
```

### Deploying your app with MongoDB

To use MongoDB in production, edit your adapter setting in `config/env/production.js`:
Expand Down