require('dotenv').load(); // Load local env values
require('./lib/db'); // Connect to database

var logger = require('./lib/logger');
var PORT = process.env['PORT'] || 3000;
var express = require('express');
var session = require('cookie-session');
var cors = require('cors');
var bodyParser = require('body-parser')
var app = module.exports = express();

app.use(bodyParser.json());
app.use(cors());
app.use(session({
  name: 'ele.user',
  secret: process.env['SESSION_SECRET'] || 'yEkWdTDGin2ajoCbxzuEeDOZzLVoy8BM4tH7S_R2',
  maxage: 1000 * 60 * 60 * 24 * 30
}));
app.use(logger.network());

// Adds helpful namespace for params
app.use(function (req, res, next) {
  req.meta = {};
  next();
});

var auth = require('./lib/auth')(app);

// app.use(function (req, res, next) {});

// Initialize routes
[
  'packages',
  'user-packages',
  'home'
].forEach(function (routeName) {
  require('./lib/routes/' + routeName)({
    app: app,
    auth: auth
  });
});

app.listen(PORT, function() {
  logger.info('Server started. Listening on port %d', PORT);
});
@@ -553,16 +553,194 @@
  24 * 30
+,%0A  cookie: %7B%0A    // QUESTION: should we use a different value in the env variables%0A    // to store this information%0A    domain: process.env.WEB_ORIGIN %7C%7C process.env.ORIGIN,%0A  %7D
 %0A%7D));%0Aap

Set domain of cookie. Ref #8