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