From 04cddf58cf7b977e7d38706a54366e2b408e6705 Mon Sep 17 00:00:00 2001 From: zimbatm Date: Tue, 14 May 2019 16:37:10 +0200 Subject: [PATCH 1/2] tweak the bower dependencies work around a missing bower2nix features. see https://github.com/rvl/bower2nix/issues/19 --- bower.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bower.json b/bower.json index 1021dbf62..b362c0a5f 100644 --- a/bower.json +++ b/bower.json @@ -45,7 +45,7 @@ "localforage": "^1.5.2", "html2canvas": "^0.4.1", "croppie": "^2.5.0", - "sortablejs": "#^1.6.0", + "sortablejs": "^1.6.0", "saferphore": "^0.0.1", "jszip": "Stuk/jszip#^3.1.5", "requirejs-plugins": "^1.0.3" From 35dd3abbb5ef6e3f9d5fb0b31b693c430d159b4a Mon Sep 17 00:00:00 2001 From: zimbatm Date: Tue, 14 May 2019 21:43:19 +0200 Subject: [PATCH 2/2] make the config path configurable --- lib/load-config.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/load-config.js b/lib/load-config.js index 7b9f73251..80f4706dc 100644 --- a/lib/load-config.js +++ b/lib/load-config.js @@ -1,11 +1,14 @@ +/* jslint node: true */ +"use strict"; var config; +var configPath = process.env.CRYPTPAD_CONFIG || "../config/config"; try { - config = require("../config/config"); + config = require(configPath); if (config.adminEmail === 'i.did.not.read.my.config@cryptpad.fr') { console.log("You can configure the administrator email (adminEmail) in your config/config.js file"); } } catch (e) { - console.log("You can customize the configuration by copying config/config.example.js to config/config.js"); + console.log("Config not found, loading the example config. You can customize the configuration by copying config/config.example.js to " + configPath); config = require("../config/config.example"); } module.exports = config;