Skip to content

Commit 2c209f6

Browse files
author
va6un
committed
Add warning workaround
1 parent 772922d commit 2c209f6

10 files changed

+30
-0
lines changed

aggregation.js

+3
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ async function main() {
1010
/**
1111
* The Mongo Client you will use to interact with your database
1212
* See https://mongodb.github.io/node-mongodb-native/3.6/api/MongoClient.html for more details
13+
* In case: '[MONGODB DRIVER] Warning: Current Server Discovery and Monitoring engine is deprecated...'
14+
* pass option { useUnifiedTopology: true } to the MongoClient constructor.
15+
* const client = new MongoClient(uri, {useUnifiedTopology: true})
1316
*/
1417
const client = new MongoClient(uri);
1518

changeStreams.js

+3
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ async function main() {
1111
/**
1212
* The Mongo Client you will use to interact with your database
1313
* See https://mongodb.github.io/node-mongodb-native/3.6/api/MongoClient.html for more details
14+
* In case: '[MONGODB DRIVER] Warning: Current Server Discovery and Monitoring engine is deprecated...'
15+
* pass option { useUnifiedTopology: true } to the MongoClient constructor.
16+
* const client = new MongoClient(uri, {useUnifiedTopology: true})
1417
*/
1518
const client = new MongoClient(uri);
1619

changeStreamsTestData.js

+3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ async function main() {
1414
/**
1515
* The Mongo Client you will use to interact with your database
1616
* See https://mongodb.github.io/node-mongodb-native/3.6/api/MongoClient.html for more details
17+
* In case: '[MONGODB DRIVER] Warning: Current Server Discovery and Monitoring engine is deprecated...'
18+
* pass option { useUnifiedTopology: true } to the MongoClient constructor.
19+
* const client = new MongoClient(uri, {useUnifiedTopology: true})
1720
*/
1821
const client = new MongoClient(uri);
1922

connection.js

+3
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ async function main() {
1010
/**
1111
* The Mongo Client you will use to interact with your database
1212
* See https://mongodb.github.io/node-mongodb-native/3.6/api/MongoClient.html for more details
13+
* In case: '[MONGODB DRIVER] Warning: Current Server Discovery and Monitoring engine is deprecated...'
14+
* pass option { useUnifiedTopology: true } to the MongoClient constructor.
15+
* const client = new MongoClient(uri, {useUnifiedTopology: true})
1316
*/
1417
const client = new MongoClient(uri);
1518

create.js

+3
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ async function main(){
1010
/**
1111
* The Mongo Client you will use to interact with your database
1212
* See https://mongodb.github.io/node-mongodb-native/3.6/api/MongoClient.html for more details
13+
* In case: '[MONGODB DRIVER] Warning: Current Server Discovery and Monitoring engine is deprecated...'
14+
* pass option { useUnifiedTopology: true } to the MongoClient constructor.
15+
* const client = new MongoClient(uri, {useUnifiedTopology: true})
1316
*/
1417
const client = new MongoClient(uri);
1518

delete.js

+3
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ async function main() {
1010
/**
1111
* The Mongo Client you will use to interact with your database
1212
* See https://mongodb.github.io/node-mongodb-native/3.6/api/MongoClient.html for more details
13+
* In case: '[MONGODB DRIVER] Warning: Current Server Discovery and Monitoring engine is deprecated...'
14+
* pass option { useUnifiedTopology: true } to the MongoClient constructor.
15+
* const client = new MongoClient(uri, {useUnifiedTopology: true})
1316
*/
1417
const client = new MongoClient(uri);
1518

template.js

+3
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ async function main() {
1010
/**
1111
* The Mongo Client you will use to interact with your database
1212
* See https://mongodb.github.io/node-mongodb-native/3.6/api/MongoClient.html for more details
13+
* In case: '[MONGODB DRIVER] Warning: Current Server Discovery and Monitoring engine is deprecated...'
14+
* pass option { useUnifiedTopology: true } to the MongoClient constructor.
15+
* const client = new MongoClient(uri, {useUnifiedTopology: true})
1316
*/
1417
const client = new MongoClient(uri);
1518

transaction.js

+3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ async function main() {
1414
/**
1515
* The Mongo Client you will use to interact with your database
1616
* See https://mongodb.github.io/node-mongodb-native/3.6/api/MongoClient.html for more details
17+
* In case: '[MONGODB DRIVER] Warning: Current Server Discovery and Monitoring engine is deprecated...'
18+
* pass option { useUnifiedTopology: true } to the MongoClient constructor.
19+
* const client = new MongoClient(uri, {useUnifiedTopology: true})
1720
*/
1821
const client = new MongoClient(uri);
1922

update.js

+3
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ async function main() {
1010
/**
1111
* The Mongo Client you will use to interact with your database
1212
* See https://mongodb.github.io/node-mongodb-native/3.6/api/MongoClient.html for more details
13+
* In case: '[MONGODB DRIVER] Warning: Current Server Discovery and Monitoring engine is deprecated...'
14+
* pass option { useUnifiedTopology: true } to the MongoClient constructor.
15+
* const client = new MongoClient(uri, {useUnifiedTopology: true})
1316
*/
1417
const client = new MongoClient(uri);
1518

usersCollection.js

+3
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ async function main() {
2020
/**
2121
* The Mongo Client you will use to interact with your database
2222
* See https://mongodb.github.io/node-mongodb-native/3.6/api/MongoClient.html for more details
23+
* In case: '[MONGODB DRIVER] Warning: Current Server Discovery and Monitoring engine is deprecated...'
24+
* pass option { useUnifiedTopology: true } to the MongoClient constructor.
25+
* const client = new MongoClient(uri, {useUnifiedTopology: true})
2326
*/
2427
const client = new MongoClient(uri);
2528

0 commit comments

Comments
 (0)