summaryrefslogtreecommitdiffstats
path: root/cds-ui/server/index.js
diff options
context:
space:
mode:
authoreeginux <henry.xie@est.tech>2019-07-04 15:01:39 +0100
committereeginux <henry.xie@est.tech>2019-07-04 15:01:49 +0100
commitb9ee86938b144b93e7caef85e6d5d5f51a2b0628 (patch)
tree40c255708b086a53a793f594d5e8453541a9b192 /cds-ui/server/index.js
parenta6fae85764a8dfbeba6000a060b8be0f21fb0466 (diff)
Enable https for cds-ui
Enabling https for cds-ui-server Add dummy private key and cert Change-Id: I9d318ceea3527ebb4f0776e26fb9dbf5d4cb6615 Issue-ID: OJSI-196 Signed-off-by: Xuefeng Xie <henry.xie@est.tech>
Diffstat (limited to 'cds-ui/server/index.js')
-rw-r--r--cds-ui/server/index.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/cds-ui/server/index.js b/cds-ui/server/index.js
index b79f7d6d3..161a18be7 100644
--- a/cds-ui/server/index.js
+++ b/cds-ui/server/index.js
@@ -20,6 +20,7 @@ limitations under the License.
*/
const application = require('./dist');
+const fs = require('fs')
module.exports = application;
@@ -27,6 +28,9 @@ if (require.main === module) {
// Run the application
const config = {
rest: {
+ protocol: 'https',
+ key: fs.readFileSync('server.key'),
+ cert: fs.readFileSync('server.cert'),
port: +process.env.PORT || 3000,
host: process.env.HOST || 'localhost',
openApiSpec: {