title: Node JS session error: express-session deprecated
body: <p>I have the following in my node js file</p>
  
  <pre><code>var express = require('express');
  var util = require('./lib/utility');
  var partials = require('express-partials');
  var bodyParser = require('body-parser');
  
  var session = require('express-session');
  
  /* abstracted some code */
  
  app.use(session({
    genid: function(req) {
      return genuuid(); // use UUIDs for session IDs
    },
    secret: 'keyboard cat'
  }));
  </code></pre>
  
  <p>When I start the server, I get</p>
  
  <pre><code>express-session deprecated undefined resave option; provide resave option server.js
  express-session deprecated undefined saveUninitialized option; provide saveUninitialized option server.js
  </code></pre>
  
  <p>I am having a hard time figuring out what is deprecated? I copied the example from <a href="https://github.com/expressjs/session" rel="noreferrer">https://github.com/expressjs/session</a></p>
  
  <p>When I try to load the page I get:</p>
  
  <blockquote>
    <p>ReferenceError: genuuid is not defined at app.use.session.genid</p>
  </blockquote>