mongoose add documents code example
Example 1: how to install mongoose
$ npm install mongoose
Example 2: mongoose add document
const Product = require('../models/product.js');
const product = new Product();
product.save()
.then(doc => {})
.catch(err => {});