I am getting a mongoose connection error.

52 views
Skip to first unread message

That GenZ Gamer

unread,
Jan 12, 2022, 6:11:33 PM1/12/22
to Mongoose Node.JS ODM
My error is attached and the code is below.
---
const mongoose = require("mongoose");

connect().catch((err) => console.log(err));

async function connect() {
await mongoose.connect(
"mongodb://admin:mypassword@ip:port/?authSource=admin",
{
useNewUrlParser: true,
useUnifiedTopology: true,
},
);

mongoose.disconnect();
}
Screenshot 2022年01月12日 143941.png
Reply all
Reply to author
Forward
0 new messages