Deno not connecting to mongodb

Viewed 266

I'm hosting a test database on mongodb atlas, and I'm trying to connect via a simple deno app, but I keep getting the following error:

failed to lookup address information: Temporary failure in name resolution

I have made sure nothing is blocked in my firewall, and flushed my DNS to make sure it wasn't that. My code is below.

const URI = 'mongodb+srv://testUser:*password*@testdb.byjzd.azure.mongodb.net/TestDB?retryWrites=true&w=majority';
const client = new MongoClient();
await client.connect(URI).catch((err: string) => {
  console.log(err);
});

Note: connecting a simple NodeJS app works fine.

0 Answers
Related