mirror of https://github.com/xwiki-labs/cryptpad
implement server offline mode (no ws)
This commit is contained in:
parent
d12603c50a
commit
929159a0f4
|
@ -14,6 +14,7 @@ const Util = require("./common-util");
|
|||
module.exports.create = function (config) {
|
||||
|
||||
const Env = {
|
||||
OFFLINE_MODE: false,
|
||||
FRESH_KEY: '',
|
||||
FRESH_MODE: true,
|
||||
DEV_MODE: false,
|
||||
|
@ -117,6 +118,9 @@ module.exports.create = function (config) {
|
|||
//console.log("FRESH MODE ENABLED");
|
||||
Env.FRESH_KEY = +new Date();
|
||||
}
|
||||
|
||||
// Offline mode is mostly for development. It lets us test clientside cache and offline support
|
||||
if (process.env.OFFLINE) { Env.OFFLINE_MODE = true; }
|
||||
}());
|
||||
|
||||
Env.checkCache = function (channel) {
|
||||
|
|
|
@ -38,6 +38,7 @@
|
|||
"start": "node server.js",
|
||||
"dev": "DEV=1 node server.js",
|
||||
"fresh": "FRESH=1 node server.js",
|
||||
"offline": "FRESH=1 OFFLINE=1 node server.js",
|
||||
"package": "PACKAGE=1 node server.js",
|
||||
"lint": "jshint --config .jshintrc --exclude-path .jshintignore . && ./node_modules/lesshint/bin/lesshint -c ./.lesshintrc ./customize.dist/src/less2/",
|
||||
"lint:js": "jshint --config .jshintrc --exclude-path .jshintignore .",
|
||||
|
|
Loading…
Reference in New Issue