diff --git a/server/config/base.js b/server/config/base.js index efb92e0..0697375 100644 --- a/server/config/base.js +++ b/server/config/base.js @@ -44,12 +44,14 @@ module.exports = { */ server: { + root: '', host: '0.0.0.0', port: '22380', }, //opds: false, opds: { enabled: true, + root: '', user: '', password: '', }, diff --git a/server/core/opds/index.js b/server/core/opds/index.js index 29aaab7..b2cc556 100644 --- a/server/core/opds/index.js +++ b/server/core/opds/index.js @@ -14,7 +14,7 @@ module.exports = function(app, config) { if (!config.opds || !config.opds.enabled) return; - const opdsRoot = '/opds'; + const opdsRoot = config.opds.root || '/opds'; config.opdsRoot = opdsRoot; const root = new RootPage(config); diff --git a/server/index.js b/server/index.js index 3d9aa66..c5bc31a 100644 --- a/server/index.js +++ b/server/index.js @@ -50,7 +50,7 @@ async function init() { config.logDir = `${config.dataDir}/log`; config.publicDir = `${config.dataDir}/public`; config.publicFilesDir = `${config.dataDir}/public-files`; - config.rootPathStatic = `/root`; + config.rootPathStatic = config.server.root || ''; config.bookPathStatic = `${config.rootPathStatic}/book`; config.bookDir = `${config.publicFilesDir}/book`;