@tiledesk/tiledesk-server 2.3.91 → 2.3.92
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +1 -1
- package/pubmodules/apps/listener.js +14 -1
package/package.json
CHANGED
@@ -1,6 +1,19 @@
|
|
1
1
|
const apps = require("@tiledesk/tiledesk-apps");
|
2
2
|
var winston = require('../../config/winston');
|
3
3
|
|
4
|
+
var config = require('../../config/database'); // get db config file
|
5
|
+
|
6
|
+
let configSecretOrPubicKay = process.env.GLOBAL_SECRET || config.secret;
|
7
|
+
|
8
|
+
var pKey = process.env.GLOBAL_SECRET_OR_PUB_KEY;
|
9
|
+
// console.log("pKey",pKey);
|
10
|
+
|
11
|
+
if (pKey) {
|
12
|
+
configSecretOrPubicKay = pKey.replace(/\\n/g, '\n');
|
13
|
+
}
|
14
|
+
|
15
|
+
// console.log("configSecretOrPubicKay",configSecretOrPubicKay);
|
16
|
+
|
4
17
|
class Listener {
|
5
18
|
|
6
19
|
listen(config) {
|
@@ -12,7 +25,7 @@ class Listener {
|
|
12
25
|
}
|
13
26
|
|
14
27
|
apps.startApp({
|
15
|
-
ACCESS_TOKEN_SECRET: process.env.APPS_ACCESS_TOKEN_SECRET ||
|
28
|
+
ACCESS_TOKEN_SECRET: process.env.APPS_ACCESS_TOKEN_SECRET || configSecretOrPubicKay,
|
16
29
|
MONGODB_URI: process.env.APPS_MONGODB_URI || config.databaseUri,
|
17
30
|
KALEYRA_ENABLED: process.env.KALEYRA_ENABLED || config.kaleyra_enabled
|
18
31
|
}, () => {
|