const express = require('express');
const cors = require('cors');
const mongoose = require('mongoose');
const mongoURI = "mongodb+srv://Purnendu:<password>@cluster0.ftshfof.mongodb.net/?retryWrites=true&w=majority&appName=Cluster0";
async function main() {
await mongoose.connect(mongoURI);
console.log("Connected to Mongo");
}
main();
This gives the error as: -
MongoAPIError: URI must include hostname, domain name, and tld
Please help