From fa24e972f13e288668565cf3081b834df62f5b71 Mon Sep 17 00:00:00 2001 From: Bruno Bottazzini Date: Tue, 15 Sep 2015 19:35:55 -0300 Subject: [PATCH] Fixes sessions errors and remove unused api reference - Change index to render only when fs.mkdir is concluded. - Remove hljs reference since it is not used anymore. - Change default retries when session-file-store cannot find read the session Signed-off-by: Bruno Bottazzini --- server/app.js | 4 +++- server/routes.js | 4 ++-- server/views/index.html | 1 - 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/server/app.js b/server/app.js index cf2f3d3..4358cbf 100644 --- a/server/app.js +++ b/server/app.js @@ -56,7 +56,9 @@ secret: 'keepitsecret', resave: true, saveUninitialized: true, - store: new SessionStore + store: new SessionStore({ + retries: 500 + }) })); var jConf = getConfigurationJson(); diff --git a/server/routes.js b/server/routes.js index b2dbfa6..93ba280 100644 --- a/server/routes.js +++ b/server/routes.js @@ -42,9 +42,9 @@ /* GET home page. */ router.get('/', function(req, res) { fs.mkdir(tmp_dir(current_user(req)), function() { - console.log('Dir ' + tmp_dir(current_user(req)) + 'already exists!'); + console.log('Accessed tmp dir -> ' + tmp_dir(current_user(req))); + res.render('index'); }); - res.render('index'); }); /* Serve the Tree */ diff --git a/server/views/index.html b/server/views/index.html index 9bb0773..5c4b63f 100644 --- a/server/views/index.html +++ b/server/views/index.html @@ -200,7 +200,6 @@ -