diff --git a/package.json b/package.json index 0b6f85d0a..fd9205157 100644 --- a/package.json +++ b/package.json @@ -20,6 +20,7 @@ "scripts": { "start": "node server.js", "dev": "DEV=1 node server.js", + "fresh": "FRESH=1 node server.js", "lint": "jshint --config .jshintrc --exclude-path .jshintignore . && ./node_modules/lesshint/bin/lesshint -c ./.lesshintrc ./customize.dist/src/less2/", "flow": "./node_modules/.bin/flow", "test": "node TestSelenium.js", diff --git a/server.js b/server.js index 4c64965fe..771d055af 100644 --- a/server.js +++ b/server.js @@ -32,6 +32,13 @@ if (DEV_MODE) { console.log("DEV MODE ENABLED"); } +var FRESH_MODE = !!process.env.FRESH; +var FRESH_KEY = ''; +if (FRESH_MODE) { + console.log("FRESH MODE ENABLED"); + FRESH_KEY = +new Date(); +} + const clone = (x) => (JSON.parse(JSON.stringify(x))); var setHeaders = (function () { @@ -136,7 +143,7 @@ app.get('/api/config', function(req, res){ 'var obj = ' + JSON.stringify({ requireConf: { waitSeconds: 60, - urlArgs: 'ver=' + Package.version + (DEV_MODE? '-' + (+new Date()): ''), + urlArgs: 'ver=' + Package.version + (FRESH_KEY? '-' + FRESH_KEY: '') + (DEV_MODE? '-' + (+new Date()): ''), }, removeDonateButton: (config.removeDonateButton === true), allowSubscriptions: (config.allowSubscriptions === true),