<link href="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<!------ Include the above in your HEAD tag ---------->
<h1>Connection Mongoose with nodejs </h1>
const mongoose = require('mongoose');
const main= async()=>{
await mongoose.connect("mongodb://localhost:27017/testing");
const mSchema= new mongoose.Schema({
name:String,
skill:String
});
const mModel= mongoose.model('modules',mSchema);
let data = new mModel({name:"Ekta Verma",skill:"Software Tester"});
let result = await data.save();
console.log(result);
}
main();