Created
July 12, 2017 14:56
-
-
Save radinreth/61b4b824c9a1f7a32a1c5f4213939076 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I'm using mongoose 4.11.1 | |
and solve this problem by setting extra option `useMongoClient` to `true` | |
```javascript | |
mongoose.Promise = global.Promise; | |
mongoose.connect('mongodb://localhost:27017/database-name', { useMongoClient: true }, (err) => { | |
err && console.error("Error: " + error); | |
}); | |
``` | |
[For More Detail](http://mongoosejs.com/docs/connections.html#use-mongo-client) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment