diff --git a/index.js b/index.js index c4dfc11..59c1719 100755 --- a/index.js +++ b/index.js @@ -12,7 +12,7 @@ let ObjectId = mongodb.ObjectId; const browser = await puppeteer.launch({ args: ['--no-sandbox'] }); const page = await browser.newPage(); - const uri = "mongodb+srv://mongo:mongo@random.hb8do.mongodb.net/leetcode?retryWrites=true&w=majority&useNewUrlParser=true&useUnifiedTopology=true"; + const uri = const client = new MongoClient(uri); await client.connect(); diff --git a/mongoCon.js b/mongoCon.js index d6ab9d9..0585e7e 100644 --- a/mongoCon.js +++ b/mongoCon.js @@ -3,7 +3,7 @@ import mongodb from 'mongodb' import { readFile, writeFile } from 'fs/promises'; const { MongoClient, ObjectId } = mongodb -const uri = "mongodb+srv://mongo:mongo@random.hb8do.mongodb.net/leetcode?retryWrites=true&w=majority&useNewUrlParser=true&useUnifiedTopology=true"; +const uri = const client = new MongoClient(uri); try {