From 354777b1872eabfdfa55a6c655569473fea554fe Mon Sep 17 00:00:00 2001 From: cgeek <cem.moreau@gmail.com> Date: Sat, 7 Jan 2017 18:53:20 +0100 Subject: [PATCH] [fix] duniter/duniter#779 Add back --webmhost and --webmport options --- index.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index acc1439..6fb6648 100644 --- a/index.js +++ b/index.js @@ -17,11 +17,18 @@ if (process.argv.length === 2) { module.exports = { duniter: { + 'cliOptions': [ + + // Webmin options + { value: '--webmhost <host>', desc: 'Local network interface to connect to (IP)' }, + { value: '--webmport <port>', desc: 'Local network port to connect', parser: parseInt } + ], + 'cli': [{ name: 'webstart', desc: 'Do a webstart', requires: ['service'], - promiseCallback: (duniterServer) => co(function*(){ + promiseCallback: (duniterServer, conf, program) => co(function*(){ try { @@ -30,8 +37,8 @@ module.exports = { ***************************************/ const app = express(); - const HOTE = 'localhost'; - const PORT = 9220; + const HOTE = program.webmhost || 'localhost'; + const PORT = program.webmport || 9220; /** * Sur appel de l'URL /abc -- GitLab