摘要: 1.安装bcryptjs模块 2.在需要加密的模块中引入bcryptjs库 require('bcryptjs'); 实战 : /** * 定义数据库模型 */ const userSchema = new mongoose.Schema({ username:{ type:String, uniq 阅读全文
posted @ 2019-09-07 21:54 武卡卡 阅读(1335) 评论(3) 推荐(2) 编辑