// Throw an error if the connection fails Mongoose.connection.on('error', function(err) { if(err) throw err; });
/** * Initialize Session * Uses MongoDB-based session store * */ var init = function () { if(process.env.NODE_ENV === 'production') { return session({ secret: config.sessionSecret, resave: false, saveUninitialized: false, unset: 'destroy', store: new MongoStore({ mongooseConnection: db.Mongoose.connection }) }); } else { return session({ secret: config.sessionSecret, resave: false, unset: 'destroy', saveUninitialized: true }); } }
secret: 'HD2w.)q*VqRT4/#NK2M/,E^B)}FED5fWU!dKe[wk', store: new MongoStore({ mongooseConnection: mongoose.connection, ttl: 14 * 24 * 60 * 60, // expires in 14 days }),
(() => { let instance; let db = mongoose.connection;
secret: 'HD2w.)q*VqRT4/#NK2M/,E^B)}FED5fWU!dKe[wk', store: new MongoStore({ mongooseConnection: mongoose.connection, ttl: 14 * 24 * 60 * 60, // save session 14 days }),
secret: 'HD2w.)q*VqRT4/#NK2M/,E^B)}FED5fWU!dKe[wk', store: new MongoStore({ mongooseConnection: mongoose.connection, ttl: 14 * 24 * 60 * 60, // save session 14 days }),
secret: 'HD2w.)q*VqRT4/#NK2M/,E^B)}FED5fWU!dKe[wk', store: new MongoStore({ mongooseConnection: mongoose.connection, ttl: 14 * 24 * 60 * 60, // expires in 14 days }),
secret: 'HD2w.)q*VqRT4/#NK2M/,E^B)}FED5fWU!dKe[wk', store: new MongoStore({ mongooseConnection: mongoose.connection, ttl: 14 * 24 * 60 * 60, // save session 14 days }),
secret: 'HD2w.)q*VqRT4/#NK2M/,E^B)}FED5fWU!dKe[wk', store: new MongoStore({ mongooseConnection: mongoose.connection, ttl: 14 * 24 * 60 * 60, // save session 14 days }),
secret: 'HD2w.)q*VqRT4/#NK2M/,E^B)}FED5fWU!dKe[wk', store: new MongoStore({ mongooseConnection: mongoose.connection, ttl: 14 * 24 * 60 * 60, // save session 14 days }),
secret: 'HD2w.)q*VqRT4/#NK2M/,E^B)}FED5fWU!dKe[wk', store: new MongoStore({ mongooseConnection: mongoose.connection, ttl: 14 * 24 * 60 * 60, // save session 14 days }),
secret: 'HD2w.)q*VqRT4/#NK2M/,E^B)}FED5fWU!dKe[wk', store: new MongoStore({ mongooseConnection: mongoose.connection, ttl: 14 * 24 * 60 * 60, // expires in 14 days }),
secret: 'HD2w.)q*VqRT4/#NK2M/,E^B)}FED5fWU!dKe[wk', store: new MongoStore({ mongooseConnection: mongoose.connection, ttl: 14 * 24 * 60 * 60, // expires in 14 days }),
secret: 'HD2w.)q*VqRT4/#NK2M/,E^B)}FED5fWU!dKe[wk', store: new MongoStore({ mongooseConnection: mongoose.connection, ttl: 14 * 24 * 60 * 60, // expires in 14 days }),
secret: 'HD2w.)q*VqRT4/#NK2M/,E^B)}FED5fWU!dKe[wk', store: new MongoStore({ mongooseConnection: mongoose.connection, ttl: 14 * 24 * 60 * 60, // expires in 14 days }),