We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
This is our code that we were using to connect to the mongo-mock, which works find in mongodb:
MongoClient.connect(process.env.MONGODB_CONFIG) | ^ 63 | .then(client => { 64 | mongo = client.db('myDb');
The problem was that mongo was depending on us passing in a dbname as the path parameter of the URL:
MongoClient.connect = function(url, options, callback) { ... url = urlparse(url); ... var dbname = url.pathname.replace(/^\//, ''); return new Db(dbname, server).open(callback);
...We were not passing in dbname.
The workaround was this:
MongoClient.connect(process.env.MONGODB_CONFIG + '/myDb') .then(client => { mongo = client;
...That is, I needed to send the db in as a string.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
This is our code that we were using to connect to the mongo-mock, which works find in mongodb:
The problem was that mongo was depending on us passing in a dbname as the path parameter of the URL:
...We were not passing in dbname.
The workaround was this:
...That is, I needed to send the db in as a string.
The text was updated successfully, but these errors were encountered: