const mg=require("mongoose") mg.connect("mongoose://127.0.1.27017/test") .then(()=>{ console.log("connection successfull.")}) //successfull connection .catch((err)=>{console.error(err)}) //if error is therethen it fetch const mySchema=new mg.mySchema({ name:{type:String,require:true}, lastname:String, age:Number, active:Boolean, date:{type:Date,default:new Date()} }) mg.pluralize(null) // doesnot makes the plural of collection const person=mg.model("person",mySchema) // person:collection namewith teh above mentioned Schema.