mongoose.connect documentation code example
Example 1: how to install mongoose
$ npm install mongoose
Example 2: mongoose connect
mongoose.connect('mongodb://localhost:27017/test', {
useMongoClient: true,
connectTimeoutMS: 1000
})
$ npm install mongoose
mongoose.connect('mongodb://localhost:27017/test', {
useMongoClient: true,
connectTimeoutMS: 1000
})