mongodb-js/connect-mongodb-session

Expected an assignment or function call

LaKing opened this issue · 3 comments

My JS linter complains on store.client

store.on('connected', function() {
  store.client; // The underlying MongoClient object from the MongoDB driver
});

Actually, since I'm new to connect-mongodb-session, I'm not sure if this is a real issue, or .. ?

The store.client; bit is just an example, you don't really need that line or even store.on('connected') in general. Will add a comment about that in the docs.

Oh I understand. I would suggest to modify it to

store.on('connected', function() {
  console.log(store.client); // The underlying MongoClient object from the MongoDB driver
});

I just removed it. That's really something that belongs in API docs, not a first example, because it isn't necessary to get up and running with this module.