how to initialize connection to mongoose only once in entire project 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 => {});