Basically you should try connecting with your url link, and specify the DB name on the mongoose connect method
so if your cluster link is:
mongodb+srv://userName:Passwrod@clustor.mongodb.net/
and your DB name is:
testDB
then you should call the mongoose.connect method as follows:
mongoose.connect('mongodb+srv://userName:Passwrod@cluster.mongodb.net/', {dbName: 'testDB'});
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…