Open source web app engine for the Digital Telepresence Platform.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

25 lines
687 B

// config/https.js
// Copyright (C) 2022 DTP Technologies, LLC
// License: Apache-2.0
'use strict';
if (process.env.HTTPS_ENABLE === 'enabled') {
if (!process.env.HTTPS_SSL_CRT) {
throw new Error('Must specify HTTPS_SSL_CRT in .env (HTTPS is enabled)');
}
if (!process.env.HTTPS_SSL_KEY) {
throw new Error('Must specify HTTPS_SSL_KEY in .env (HTTPS is enabled)');
}
}
module.exports = {
enabled: process.env.HTTPS_ENABLE === 'enabled',
scheme: 'https',
address: process.env.HTTPS_BIND_ADDRESS || "127.0.0.1",
port: parseInt(process.env.HTTPS_BIND_PORT || "3400", 10),
options: {
crt: process.env.HTTPS_SSL_CRT,
key: process.env.HTTPS_SSL_KEY,
},
};