-
Notifications
You must be signed in to change notification settings - Fork 22
Closed
Description
I use mongodb 4.2.0.
here is my connection string
var Agent = require('sqlagent/mongodb').connect('mongodb://127.0.0.1:27017/database');Then I've got info deprecated.
(node:5317) DeprecationWarning: current URL string parser is deprecated, and will be removed in a future version. To use the new parser, pass option { useNewUrlParser: true } to MongoClient.connect.
(node:5317) DeprecationWarning: current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring engine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
Then I tried to use options like this
var Agent = require('sqlagent/mongodb').connect('mongodb://127.0.0.1:27017/database', {
useNewUrlParser: true,
useUnifiedTopology: true
});It's doesn't work because I know in sqlagent/mongodb.js, I can't adding more options.
I've seen that function connect is (conn, callback), no options in there.
So how the solution for this?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels