From efdd999161b42b834f140527c703adff604fc9bc Mon Sep 17 00:00:00 2001 From: ansuz Date: Mon, 6 Mar 2017 17:25:02 +0100 Subject: [PATCH] implement dev mode which busts cache all the time --- server.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/server.js b/server.js index 503558c1f..34f8cfedf 100644 --- a/server.js +++ b/server.js @@ -20,6 +20,11 @@ var app = Express(); var httpsOpts; +var DEV_MODE = !!process.env.DEV +if (DEV_MODE) { + console.log("DEV MODE ENABLED"); +} + const clone = (x) => (JSON.parse(JSON.stringify(x))); var setHeaders = (function () { @@ -96,7 +101,7 @@ app.get('/api/config', function(req, res){ res.send('define(' + JSON.stringify({ requireConf: { waitSeconds: 60, - urlArgs: 'ver=' + Package.version + urlArgs: 'ver=' + Package.version + (DEV_MODE? '-' + (+new Date()): ''), }, websocketPath: config.useExternalWebsocket ? undefined : config.websocketPath, websocketURL:'ws' + ((useSecureWebsockets) ? 's' : '') + '://' + host + ':' +