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

Commit

Permalink
Sessions directory path configuration
Browse files Browse the repository at this point in the history
This patch allows to configure the directory where the sessions file will be
stored. Updates server documentation

Signed-off-by: Bruno Bottazzini <bruno.bottazzini@intel.com>
  • Loading branch information
Bruno Bottazzini committed Sep 17, 2015
1 parent 12b791c commit 7a47efa
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions server/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@

try {
var app = express();
var jConf = getConfigurationJson();

app.use(session({
genid: function(req) {
Expand All @@ -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'));
Expand Down
1 change: 1 addition & 0 deletions server/configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 7a47efa

Please sign in to comment.