title: Session lifetime in node.js with express and MongoDB
body: <p>I am using node.js with the express framework. As a session store I am using MongoDB. How can I set the lifetime after which the session objects are removed from MongoDB. This is how I am doing the declaration:</p>
  
  <pre><code>app.use(express.cookieParser());
      app.use(express.session({
                  secret: "Stays my secret",
                  store: new MongoStore({ db: 'myDB' })
                      }));
  </code></pre>