From 67cde69120d2755ed463692989cb44c0d0f6f544 Mon Sep 17 00:00:00 2001 From: ansuz Date: Mon, 23 Dec 2019 17:28:01 -0500 Subject: [PATCH] drop support for configuration points we can't possibly support --- config/config.example.js | 29 ----------------------------- server.js | 10 +++------- 2 files changed, 3 insertions(+), 36 deletions(-) diff --git a/config/config.example.js b/config/config.example.js index 82b919bb5..1fb702519 100644 --- a/config/config.example.js +++ b/config/config.example.js @@ -272,7 +272,6 @@ module.exports = { */ openFileLimit: 2048, - /* ===================== * DATABASE VOLUMES * ===================== */ @@ -359,34 +358,6 @@ module.exports = { */ logFeedback: false, - /* ===================== - * DEPRECATED - * ===================== */ - /* - You have the option of specifying an alternative storage adaptor. - These status of these alternatives are specified in their READMEs, - which are available at the following URLs: - - mongodb: a noSQL database - https://github.com/xwiki-labs/cryptpad-mongo-store - amnesiadb: in memory storage - https://github.com/xwiki-labs/cryptpad-amnesia-store - leveldb: a simple, fast, key-value store - https://github.com/xwiki-labs/cryptpad-level-store - sql: an adaptor for a variety of sql databases via knexjs - https://github.com/xwiki-labs/cryptpad-sql-store - - For the most up to date solution, use the default storage adaptor. - */ - storage: './storage/file', - - /* CryptPad's socket server can be extended to respond to RPC calls - * you can configure it to respond to custom RPC calls if you like. - * provide the path to your RPC module here, or `false` if you would - * like to disable the RPC interface completely - */ - rpc: './rpc.js', - /* CryptPad supports verbose logging * (false by default) */ diff --git a/server.js b/server.js index 37cd0a00c..6fe11e06d 100644 --- a/server.js +++ b/server.js @@ -5,7 +5,7 @@ var Express = require('express'); var Http = require('http'); var Fs = require('fs'); var WebSocketServer = require('ws').Server; -var NetfluxSrv = require('./node_modules/chainpad-server/NetfluxWebsocketSrv'); +var NetfluxSrv = require('chainpad-server/NetfluxWebsocketSrv'); var Package = require('./package.json'); var Path = require("path"); var nThen = require("nthen"); @@ -13,7 +13,7 @@ var nThen = require("nthen"); var config = require("./lib/load-config"); // support multiple storage back ends -var Storage = require(config.storage||'./storage/file'); +var Storage = require('./storage/file'); var app = Express(); @@ -256,11 +256,7 @@ var nt = nThen(function (w) { }, 1000 * 60 * 5); // run every five minutes })); }).nThen(function (w) { - config.rpc = typeof(config.rpc) === 'undefined'? './rpc.js' : config.rpc; - if (typeof(config.rpc) !== 'string') { return; } - // load pin store... - var Rpc = require(config.rpc); - Rpc.create(config, w(function (e, _rpc) { + require("./rpc").create(config, w(function (e, _rpc) { if (e) { w.abort(); throw e;