Skip to content
This repository has been archived by the owner on Mar 27, 2024. It is now read-only.

Commit

Permalink
Add session-file-store
Browse files Browse the repository at this point in the history
To bring back some kind of session storage after that sqlite failure.
  • Loading branch information
Wojbie committed Jan 12, 2019
1 parent 7e9c58f commit 73618be
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 4 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const bb = require("express-busboy");
const handlebars = require("express-handlebars");
const promBundle = require("express-prom-bundle");
const session = require("express-session");
const FileStore = require('session-file-store')(session);
const helpers = require("handlebars-helpers")();
const dateformat = require("helper-dateformat");
const Finder = require("fs-finder");
Expand Down Expand Up @@ -122,9 +123,10 @@ app.engine(".hbs", handlebars({
app.set("view engine", ".hbs");
app.use(session({
secret: config.sessionSecret,
cookie: {},
cookie: {maxAge: 2628000000},
store: new FileStore({}),
resave: false,
saveUninitialized: true
saveUninitialized: false
}));

bb.extend(app, {
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
"moment": "^2.20.1",
"paginator": "^1.0.0",
"read-chunk": "^2.1.0",
"sanitize-filename": "^1.6.1"
"sanitize-filename": "^1.6.1",
"session-file-store": "^1.2.0"
},
"optionalDependencies": {
"highlights": "^3.1.1",
Expand Down

0 comments on commit 73618be

Please sign in to comment.