【发布时间】:2019-02-11 10:06:28
【问题描述】:
是哪一个?为什么有些猫鼬代码有mongoose.connect(),而另一些有mongoose.connection()
我觉得connection() 方法是最新的。 connect() 似乎已被弃用。
【问题讨论】:
-
The docs say 你可以使用
mongoose.connect()方法连接到MongoDB。
标签: javascript node.js mongoose mean