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