mongoose

作者: coffee1949 | 来源:发表于2019-06-15 22:22 被阅读0次
  • 安装
npm i mongoose -S 
  • 使用
let mongoose = require('mongoose');
let studentSchema = new mongoose.Schema({
    name: String,
    age: Number,
    sex: String
})
module.exports = mongoose.model('student',studentSchema);

相关文章

网友评论

      本文标题:mongoose

      本文链接:https://www.haomeiwen.com/subject/egvifctx.html