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();
}