Last active
April 27, 2021 04:27
-
-
Save Muhammed-Rahif/db3b5b5b925795269bb2f944df14237f to your computer and use it in GitHub Desktop.
This file contains hidden or 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
var express = require('express'); | |
// Import of express-session | |
var session = require('express-session'); | |
// Configure | |
app.use(session({secret:"Key",cookie:{maxAge:600000}})) | |
// Usage | |
app.use("./",(req,res) => { | |
req.session.YOUR_KEY = YOUR_VALUE | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment