Skip to content

Instantly share code, notes, and snippets.

@drfloob

drfloob/app.js

Created Mar 13, 2016
Embed
What would you like to do?
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);
{
"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