added SSL option into setup

This commit is contained in:
subnub
2020-05-22 12:53:59 -04:00
parent 81a79fe25e
commit 98d2cd8002
+32
View File
@@ -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";