diff --git a/scripts/trymongo.js b/scripts/trymongo.js index 9b674d49..c0830cc6 100644 --- a/scripts/trymongo.js +++ b/scripts/trymongo.js @@ -10,7 +10,7 @@ const url = 'mongodb://localhost/issuetracker'; function testWithCallbacks(callback) { console.log('\n--- testWithCallbacks ---'); - const client = new MongoClient(url, { useNewUrlParser: true }); + const client = new MongoClient(url, { useUnifiedTopology: true }); client.connect(function(err, client) { if (err) { callback(err); @@ -46,7 +46,7 @@ function testWithCallbacks(callback) { async function testWithAsync() { console.log('\n--- testWithAsync ---'); - const client = new MongoClient(url, { useNewUrlParser: true }); + const client = new MongoClient(url, { useUnifiedTopology: true }); try { await client.connect(); console.log('Connected to MongoDB');