diff --git a/README.md b/README.md index 178cb43..01d7f09 100644 --- a/README.md +++ b/README.md @@ -119,6 +119,12 @@ The configuration file has the following attributes: Choose where to store tmp files. Default: /tmp + sessions_dir: + Choose where to store sessions files. + Default: ./sessions + If the folder does not exists, it will be created. + Where ./ means root of the server folder. + journal_access: Allows users to access the journal tab. Default: true diff --git a/server/app.js b/server/app.js index 4358cbf..8750a3a 100644 --- a/server/app.js +++ b/server/app.js @@ -44,6 +44,7 @@ try { var app = express(); + var jConf = getConfigurationJson(); app.use(session({ genid: function(req) { @@ -57,10 +58,10 @@ resave: true, saveUninitialized: true, store: new SessionStore({ - retries: 500 + retries: 500, + path: jConf.sessions_dir }) })); - var jConf = getConfigurationJson(); // view engine setup app.set('views', path.join(__dirname, 'views')); diff --git a/server/configuration.json b/server/configuration.json index 92b5e93..7b5c16c 100644 --- a/server/configuration.json +++ b/server/configuration.json @@ -2,6 +2,7 @@ "server_port": 3000, "server_output": true, "server_user_home_dir": "/tmp", + "sessions_dir" : "./sessions", "journal_access": true, "cheat_sheet_access": true, "run_fbp_access": true,