Created
February 17, 2016 07:18
-
-
Save deepal/00340e68ec80afa1a3eb to your computer and use it in GitHub Desktop.
nodesec-express-sessions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*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