From 98d2cd8002adb5e9ca2156bdbbd41a3540cfdd4b Mon Sep 17 00:00:00 2001 From: subnub Date: Fri, 22 May 2020 12:53:59 -0400 Subject: [PATCH] added SSL option into setup --- serverUtils/setupServer.js | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/serverUtils/setupServer.js b/serverUtils/setupServer.js index b9b8c3d..17ef0ae 100644 --- a/serverUtils/setupServer.js +++ b/serverUtils/setupServer.js @@ -181,6 +181,22 @@ const initServer = async() => { stringBuilder += "PASSWORD=" + JWTsecret + "\n"; + const getUseSSL = await prompts({ + type: 'toggle', + name: 'value', + message: "Use SSL? (Will Require SSL Certificate certificate.crt, certificate.ca-bundle, And certificate.key At Root Of The Project)", + initial: true, + active: 'yes', + inactive: 'no' + }) + + const useSSL = getUseSSL.value; + + if (useSSL) { + + stringBuilder += "SSL=true\n"; + } + stringBuilder += "DISABLE_STORAGE=true\n"; stringBuilder += "DOCKER=true\n"; stringBuilder += "NODE_ENV=production\n"; @@ -318,6 +334,22 @@ const initServer = async() => { stringBuilderServer += "PASSWORD=" + JWTsecret + "\n"; + const getUseSSL = await prompts({ + type: 'toggle', + name: 'value', + message: "Use SSL? (Will Require SSL Certificate certificate.crt, certificate.ca-bundle, And certificate.key At Root Of The Project)", + initial: true, + active: 'yes', + inactive: 'no' + }) + + const useSSL = getUseSSL.value; + + if (useSSL) { + + stringBuilderServer += "SSL=true\n"; + } + stringBuilderServer += "NODE_ENV=production\n"; stringBuilderClient += "PORT=3000\n"; stringBuilderServer += "HTTP_PORT=3000\n";