Merge pull request #33205 from mmiszy/master

Make connect-mongo compatible with newer mongodb and mongoose
This commit is contained in:
Nathan Shively-Sanders
2019-03-05 08:36:08 -08:00
committed by GitHub
2 changed files with 2 additions and 10 deletions

View File

@@ -45,8 +45,8 @@ app.use(session({
// NativeMongoPromiseOptions
var Client = mongodb.MongoClient;
var mongoDbPromise = Client.connect('mongodb://localhost/test');
var mongoDbPromise = Client.connect('mongodb://localhost/test').then(client => client.db())
app.use(session({
secret: 'secret',
store: new MongoStore({ dbPromise: mongoDbPromise})
store: new MongoStore({ dbPromise: mongoDbPromise })
}));

View File

@@ -4,14 +4,6 @@
"lib": [
"es6"
],
"paths": {
"mongodb": [
"mongodb/v2"
],
"mongoose": [
"mongoose/v4"
]
},
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": false,