accountSchema.methods.validPassword = function (password) { return bcrypt.compareSync(password, this.local.password) } // create the model for users and expose it to our app module.exports = mongoose.model('Account', accountSchema) 最后是我的控制器文件 AuthenticationController.js const Account = ...
问插入时mongoose insertOne node.js失败EN之前在mongodb搞了个免费的512MB的mongodb数据库,刚好今天要...