i just created a MongoDB Atlas account.
I'm using sails with waterline sails-mongo adapter
but I can't manage to connect via my app.
but it seems like sails-mongo is just not working with that db, which requires a very up-to-date mongo version
Is someone else using MDB Atlas && sailsjs ? (I thought about refactoring my app, but it's starting to be huuge and it just seems impossible to use the "mongodb" adapter)
Versions : - node : 6.3.1 - npm : 3.10.6 - mongo (shell) : 3.4.2 - sails-mongo npm module : [email protected]
Hey people thanks to your tips and SailsJS team I was able to figure out a few things that can help you fix this issue (I was able to):
npm install [email protected] --save
Now I went directly and created my connection like this:
{
adapter: 'sails-mongo',
url: 'mongodb://user:[email protected]:27017,server-2.mongodb.net:27017,server-3.mongodb.net:27017/test?ssl=true&replicaSet=server-&authSource=admin',
ssl: true
}
Yes, you need to add the ssl parameter again.
By looking at the sails v1.0 code, lost of this things will be fixed by that update ;) Thanks SailsJS Team!
it seems like sails-mongo is just not working with that db, which requires a very up-to-date mongo version
You hit the nail on the head -- the current sails-mongo adapter for Sails v0.12.x uses a version of the native MongoDB driver that doesn't support all the features required to work with Atlas (e.g. authSource
). See this issue on Github.
We're finishing up the last bits on the sails-mongo
adapter for Sails 1.0, which supports the latest options and has been tested successfully with Atlas, so now might be a good time to start preparing to upgrade to version 1.0. After Sails 1.0 is released we'll only be doing bug fixes and security patches to modules that work with v0.12.x.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With