mongoose 4.2 connect code example Example: mongoose.connect mongoose.connect('mongodb://localhost:27017/myapp', {useNewUrlParser: true});