Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit e3f5a5c

Browse files
committed
setting this up for key/cert injection
1 parent 87fb628 commit e3f5a5c

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

config/default.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
'use strict';
2+
const fs = require('fs');
3+
14
/*
25
* Copyright (c) 2017 TopCoder, Inc. All rights reserved.
36
*/
@@ -9,7 +12,6 @@
912
* @author TCSCODER
1013
* @version 1.1
1114
*/
12-
'use strict';
1315

1416
module.exports = {
1517
PORT: process.env.PORT || 3000, // eslint-disable-line no-magic-numbers
@@ -21,6 +23,10 @@ module.exports = {
2123
'https://github.com/cwdcwd/challengeFetcher'
2224
],
2325
KAFKA_OPTIONS: {
24-
kafkaHost: process.env.KAFKA_HOST || 'localhost:9092'
26+
kafkaHost: process.env.KAFKA_HOST || 'localhost:9092',
27+
sslOptions: {
28+
cert: process.env.KAFKA_CLIENT_CERT || fs.readFileSync('./kafka_client.cer'),
29+
key: process.env.KAFKA_CLIENT_CERT_KEY || fs.readFileSync('./kafka_client.key')
30+
}
2531
}
2632
};

0 commit comments

Comments
 (0)