Skip to content

Commit ef4b004

Browse files
committed
Adds comments about MongoClient in the create manager file
1 parent e0640e7 commit ef4b004

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/private/machines/create-manager.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,11 +125,15 @@ module.exports = {
125125
var mongoUrl = _clientConfig.url;
126126
_clientConfig = _.omit(_clientConfig, ['url', 'user', 'password', 'host', 'port', 'database']);
127127

128+
// Use unified topology. MongoDB node maintainers recommends this to be enabled
129+
// https://github.com/mongodb/node-mongodb-native/releases/tag/v3.2.1
130+
// Use new url parser to remove warnings
128131
_clientConfig = Object.assign({
129132
useNewUrlParser: true,
130133
useUnifiedTopology: true
131134
}, _clientConfig);
132135

136+
// http://mongodb.github.io/node-mongodb-native/3.5/api/MongoClient.html#.connect
133137
NodeMongoDBNativeLib.MongoClient.connect(mongoUrl, _clientConfig, function connectCb(err, client) {
134138
if (err) {
135139
return exits.error(err);

0 commit comments

Comments
 (0)