SHARE
TWEET

Untitled

a guest Jun 18th, 2019 50 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var express = require('express')
  2. var parseurl = require('parseurl')
  3. var session = require('express-session')
  4.  
  5. var app = express()
  6.  
  7. const mongoose = require('mongoose');
  8.  
  9. // Basic usage
  10. mongoose.connect(connectionOptions);
  11.  
  12. app.use(session({
  13.   secret: 'keyboard cat',
  14.   resave: false,
  15.   saveUninitialized: true,
  16.   store: new MongoStore({ mongooseConnection: mongoose.connection })
  17. }));
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top