store trilium sessions in default OS temp directory

This commit is contained in:
azivner 2017-10-23 22:36:18 -04:00
parent b9de810c69
commit 4409485ca1

3
app.js
View file

@ -7,6 +7,7 @@ const bodyParser = require('body-parser');
const helmet = require('helmet');
const session = require('express-session');
const FileStore = require('session-file-store')(session);
const os = require('os');
const indexRoute = require('./routes/index');
const loginRoute = require('./routes/login');
@ -53,7 +54,7 @@ app.use(session({
},
store: new FileStore({
ttl: 30 * 24 * 3600,
path: '../trilium-data/sessions'
path: os.tmpdir() + '/trilium-sessions'
})
}));