From e215a52fd915412c894fe98aaa8a68d22d35922a Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 15 Apr 2018 17:29:32 +0900 Subject: [PATCH] Fix bug --- cli/init.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/cli/init.js b/cli/init.js index 7a3e7d1b5..efa9911ee 100644 --- a/cli/init.js +++ b/cli/init.js @@ -121,12 +121,6 @@ inquirer.prompt(form).then(as => { }, url: as['url'], port: parseInt(as['port'], 10), - https: { - enable: as['https'], - key: as['https_key'] || null, - cert: as['https_cert'] || null, - ca: as['https_ca'] || null - }, mongodb: { host: as['mongo_host'], port: parseInt(as['mongo_port'], 10), @@ -151,6 +145,14 @@ inquirer.prompt(form).then(as => { } }; + if (as['https']) { + conf.https = { + key: as['https_key'] || null, + cert: as['https_cert'] || null, + ca: as['https_ca'] || null + }; + } + console.log(`Thanks. Writing the configuration to ${chalk.bold(path.resolve(configPath))}`); try {