iam new to mongoDB 4.1. and tried to connected it, but i
am getting error when tried to connected
appologize for my english.
here's my error, i'am running on xubuntu
Error: queryTxt ESERVFAIL cluster0.we5ri9d.mongodb.net
at QueryReqWrap.onresolve [as oncomplete] (node:internal/dns/promises:251:17) {
errno: undefined,
code: 'ESERVFAIL',
syscall: 'queryTxt',
hostname: 'cluster0.we5ri9d.mongodb.net'
}
can I get an explanation about the error there, I'm asking a question because the tutorial video that I watched didn't get an error message with the above code or to anyone who can solve the above error code:
const connect = async () => {
try {
await mongoose.connect(process.env.MONGO_URI);
console.log("Connected to MongoDB!");
} catch (error) {
throw error;
}
};
|the error I got was paused for a few seconds because it was asynchronous and then the error appeared. Obviously I'm asking this because I just started going to the backend