mongoose connection once open code example
Example 1: how to install mongoose
$ npm install mongoose
Example 2: setup mongoose locally
mongoose.connect('mongodb://username:password@host:port/database?options...', {useNewUrlParser: true});
$ npm install mongoose
mongoose.connect('mongodb://username:password@host:port/database?options...', {useNewUrlParser: true});