摘要: Model.deleteMany() Model.deleteOne() Model.find() Model.findById() Model.findByIdAndDelete() Model.findByIdAndRemove() Model.findByIdAndUpdate() Model 阅读全文
posted @ 2021-01-17 23:46 半遮 阅读(131) 评论(0) 推荐(0) 编辑
摘要: ./model/db.js // 引入mongoose const mongoose = require("mongoose"); //解决index索引引起的弃用提醒:(node:13616) DeprecationWarning: collection.ensureIndex is deprec 阅读全文
posted @ 2021-01-17 23:31 半遮 阅读(267) 评论(0) 推荐(0) 编辑
摘要: // es5 function person() { console.log("1:pe1"); //实例化一次就会执行一遍该函数, this.run = function () { //实例方法,需要实例化后才能通过实例化对象来调用 console.log("2:run"); console.lo 阅读全文
posted @ 2021-01-17 22:48 半遮 阅读(249) 评论(0) 推荐(0) 编辑