From f7167b7d17e03705666c68cedd03367cda3501ad Mon Sep 17 00:00:00 2001 From: Dmitri Zagidulin Date: Mon, 11 Jun 2018 09:27:23 -0400 Subject: [PATCH] Extract printing of debug info from LDP constructor --- lib/create-app.js | 1 + lib/ldp.js | 9 ++++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/create-app.js b/lib/create-app.js index 8854a23aa..e52e98068 100644 --- a/lib/create-app.js +++ b/lib/create-app.js @@ -44,6 +44,7 @@ function createApp (argv = {}) { argv.templates = config.initTemplateDirs(configPath) const ldp = new LDP(argv) + ldp.printDebugInfo() const app = express() diff --git a/lib/ldp.js b/lib/ldp.js index 044152b73..cbdb129b2 100644 --- a/lib/ldp.js +++ b/lib/ldp.js @@ -33,6 +33,9 @@ const RDF_MIME_TYPES = [ /** * @constructor * @param [options={}] {Object} + * @param [options.serverUri] + * @param [options.dbPath] + * @param [options.configPath] * @param [options.root] * @param [options.suffixAcl] * @param [options.suffixMeta] @@ -42,7 +45,7 @@ const RDF_MIME_TYPES = [ * @param [options.dataBrowserPath] * @param [options.webid] * @param [options.auth] - * @param [options.idp] + * @param [options.multiuser] * @param [options.proxy] * @param [options.live] * @param [options.store] @@ -87,7 +90,9 @@ class LDP { if (this.corsProxy && this.corsProxy[ 0 ] !== '/') { this.corsProxy = '/' + this.corsProxy } + } + printDebugInfo () { debug.settings('Server URI: ' + this.serverUri) debug.settings('Auth method: ' + this.auth) debug.settings('Db path: ' + this.dbPath) @@ -100,8 +105,6 @@ class LDP { debug.settings('Multi-user: ' + !!this.multiuser) debug.settings('Suppress default data browser app: ' + this.suppressDataBrowser) debug.settings('Default data browser app file path: ' + this.dataBrowserPath) - - return this } stat (file, callback) {