摘要:
返回Promise,成功则返回用户信息 const login = function (userModel,condition) { const rtn = new Promise((reslove, reject) => { userModel.find(condition, (err, docs 阅读全文
摘要:
目录结构 module db.js user.ja app.js db.js const mongoose = require('mongoose') mongoose.connect('mongodb://localhost/eg', { useNewUrlParser: true, useUni 阅读全文