我正在尝试使用Express框架设置Node.js服务器。我看到了一个函数,但是它被用作对象。我不明白这是什么意思。请给我解释一下。
const Users = mongoose.model('Users', userSchema); console.log(typeof Users); // "function"
但我可以将其用作对象,如下所示:
Users.find({}); // What this mean?????
慕虎7371278
红颜莎娜
相关分类