Created
March 13, 2016 02:55
-
-
Save drfloob/ad827c5f575720ce518d 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'); | |
var session = require('express-session') | |
var SQLiteStore = require('connect-sqlite3')(session); | |
var app = express(); | |
app.use(session({ | |
store: new SQLiteStore, | |
secret: "secret", | |
resave: false, | |
saveUninitialized: true, | |
// cookie: {maxAge: 3600000*24} | |
})); | |
app.get('/', function (req, res) { | |
res.send("0123456789"); | |
}); | |
app.listen(8889); |
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
{ | |
"name": "connect-sqlite-issue11-example-minrepro", | |
"version": "1.0.0", | |
"description": "", | |
"main": "app.js", | |
"scripts": { | |
"start": "node app.js" | |
}, | |
"dependencies": { | |
"express": "^4.13.3", | |
"sqlite3": "^3.1.1", | |
"express-session": "^1.13", | |
"connect-sqlite3": "^0.9.7" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment