I am not talking about the strict mode of the MongoDB driver. Its really about "use strict" and not passing a callback to the mongodb API.
I have to correct my last comment: As we are using Promises and calling MongoClient.connect('') in a promise which resolves with the connection, everything we do after this (like dbConnection.collection()) is again a Promise which is resolved or rejected.
This seems to break something, after accessing the first collection with one Db object, this Db object is missing the function collection.
Are there performance problems when using for each collection one connection object?
As the
documentation says there will be promises returned if no callbacks are provided, what is the preferred way to use Promises with this library?