Skip to content

Instantly share code, notes, and snippets.

@deepal
Created February 17, 2016 07:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save deepal/00340e68ec80afa1a3eb to your computer and use it in GitHub Desktop.
Save deepal/00340e68ec80afa1a3eb to your computer and use it in GitHub Desktop.
nodesec-express-sessions
/*some code here*/
var express = require('express');
var session = require('express-session');
var app = express();
app.use(session({
name: 'SESS_ID',
secret: '^#$5sX(Hf6KUo!#65^',
resave: false,
saveUninitialized: true,
cookie: {
secure: true,
httpOnly: true
}
}));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment