Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.