Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions scripts/trymongo.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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');
Expand Down