Add command line flag for enabling production cert

This commit is contained in:
Max Goodman
2020-06-21 02:10:23 -07:00
parent b191079bf2
commit a1e3f100c7
4 changed files with 8 additions and 50 deletions

View File

@@ -79,6 +79,7 @@ function initApp({ username, password, baseURL, getInitialState, onMessage }) {
export default async function initWebServer({
certDir,
certProduction,
email,
url: baseURL,
hostname: overrideHostname,
@@ -110,7 +111,7 @@ export default async function initWebServer({
dataDir: certDir,
commonName: hostname,
email,
production: process.env.NODE_DEV === 'production',
production: certProduction,
serverHost: overrideHostname || hostname,
})
server = https.createServer({ key, cert }, app.callback())