📌  相关文章
📜  mongodb atlas node js mongoose - Javascript代码示例

📅  最后修改于: 2022-03-11 15:03:45.006000             🧑  作者: Mango

代码示例1
try {
    // Connect to the MongoDB cluster
     mongoose.connect(
      mongoAtlasUri,
      { useNewUrlParser: true, useUnifiedTopology: true },
      () => console.log(" Mongoose is connected")
    );

  } catch (e) {
    console.log("could not connect");
  }