我连接到我的 dtatabse 和
mongoURI = "mongodb+srv://oussSika:<password>@cluster0.hubsz.mongodb.net/<db>?retryWrites=true&w=majority"
const db = require("./config/keys").mongoURI;
//conect to mongoDb
mongoose.set("useNewUrlParser", true);
mongoose.set("useFindAndModify", false);
mongoose.set("useCreateIndex", true);
mongoose.set("useUnifiedTopology", true);
mongoose
.connect(db, { authSource: "admin", ssl: true })
.then(() => console.log("MongoDb Connected"))
.catch((err) => console.log(err));
错误是
MongooseError:操作 users.insertOne()
缓冲在 10000 毫秒后超时