-
Notifications
You must be signed in to change notification settings - Fork 256
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
Add support for Mongos topology #241
Comments
Implemented a very experimental version in branch saintedlama/mongos https://github.com/mafintosh/mongojs/tree/saintedlama/mongos would be awesome if you could give that version a try (= alpha test) |
That was fast. I gave it a try, and I can connect and retrieve documents, but it throws a type error when trying to close the database. The script I used. var mongojs = require('mongojs');
var connection = '...';
var options = {
mongos: true,
ssl: true,
sslValidate: false,
rejectUnauthorized: false,
authMechanism: 'ScramSHA1'
};
var db = mongojs(connection, ['appUsers'], options);
db.appUsers.findOne({}, function(err, user) {
console.log(user); // Returns the user
db.close(); // Call to close throws a TypeError
}); The stack of the error.
|
Could you give it a try with a non auth mongos connection. I guess this could narrow issue issue #224 - I suspect the error to arise only in auth environments |
Any update? |
Sorry I didn't answer sooner, but I didn't have a mongos setup without authentication running, and I didn't have the time to try to set it up locally. I'll see if I can do it one of these days. |
👍 great thanks for your help |
Should be fixed in version 2.0 (released just some seconds ago) |
mongodb-core
also supports the Mongos topology, which is not exposed bymongojs
.Maybe
lib/get-topology.js
should also be a able to return anMongos
instance.The text was updated successfully, but these errors were encountered: