const mongoose = require('mongoose')    
      const Schema Name = mongoose.Schema({
          name : {
              type : String,
              default : 'default txt',
          },
      })
      module.exports =  mongoose.model( 'model name' , Schema Name)

      Javascript language logocreate mongoDB model

      MERN cookbook

      Shortcut: app.model

      0 Comments

        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.