i tryied to connect mongoDB with Node Js by below code and i getting the error
Error: querySrv EREFUSED _mongodb._tcp.e-commerce.xocsdrz.mongodb.net
    at QueryReqWrap.onresolve [as oncomplete] (node:internal/dns/promises:251:17) {
  errno: undefined,
  code: 'EREFUSED',
  syscall: 'querySrv',
  hostname: '_mongodb._tcp.e-commerce.xocsdrz.mongodb.net'
}
here is my Code to connect mongoDb with nodejs
const mongoose = require('mongoose');
// const dotenv =  require("dotenv")
// dotenv.config({path:`config/config.env`});
// const DB = process.env.DB;
// console.log(DB);
const connectDatabase = () => {
  mongoose
    .connect(
      'mongodb+srv://Karishma:<password>@e-commerce.xocsdrz.mongodb.net/?retryWrites=true&w=majority',
      {}
    )
    .then((data) => {
      console.log(`mongoDb connected with the server:${data.connection.host}`);
    })
    .catch((err) => {
      console.log(err);
    });
};
module.exports = connectDatabase;

 
     
    