-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.js.sample
More file actions
97 lines (87 loc) · 2.67 KB
/
config.js.sample
File metadata and controls
97 lines (87 loc) · 2.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
module.exports = {
database: {
module: './database/elasticsearch.js',
host: '192.168.42.54',
port: 9200
},
/* The port that the application web server will listen on
* If this is changed to something different from the default, you will need to append port numbers
* to the OAuth callbacks from the various social media sources */
port: 80,
/* The address you will reach the root of the application on
* If you serve it over https, change it accordingly here!
*/
url: 'http://localhost',
company: 'sap',
metaIndex: '_meta',
postIndex: '_post_{Y}{W}', // year will replace Y, weeknumber will replace W
crawlerIndex: '_crawler',
postIndexVersionNumber: 2,
maxCrawlDelay: 28,
mailgun: {
api: 'https://api.mailgun.net/v3/n2o.social/messages',
api_token: 'YXBpOmtleS0wMTkxODI0NmU1OWNkYTIzNzVkM2E3MDc2YmQzZTgxOQ=='
},
xing: {
//consumer_key: 'aeafbb16c6ae57838df8',
//application_secret: 'ea6eb4b2f569b5b081320f6d98ddb016aec76f79',
consumer_key: '62c1130de744ab349845',
application_secret: '8a069cf9eaa5d5be2db30936ec47cdd072cb63bc'
},
rejectCountForNewsfeed: 3,
numberOfShards: 5,
products: ['CRM', 'ECOM', 'LVM', 'HCM'],
/* This directory is either relative to the crawler files
* e.g. inside the xing/linkedin/quora directory: ../logs
* It can also be given absolutely of course: /home/crawler/logs
*/
crawlerLogDirectory: '../logs',
crawlers: {
quora: {
enabled: true,
keywords: ['Talent Management Software', 'Recruiting Software', 'Human Resource Management Systems', 'customer relation management', 'CRM'],
logfile: '../logs/quora.log'
},
linkedin: {
enabled: true,
logfile: '../logs/linkedin.log'
},
xing: {
enabled: true,
logfile: '../logs/xing.log'
}
},
component: null
}
// for HANA database replace with:
/*
module: './database/hana.js',
user: 'SYSTEM',
password: 'Popcorn57',
host: '192.168.42.38',
port: 30615
*/
// for elasticsearch replace with:
/*
module: './database/elasticsearch.js',
host: '192.168.42.54',
port: 9200
*/
var ipc = require('node-ipc')
var _ = require('lodash')
ipc.config.silent = true
ipc.connectTo('administration', handleSetup)
function handleSetup() {
ipc.of.administration.emit('connect-hello', {
company: module.exports.company,
component: module.exports.component
})
ipc.of.administration.on('patch-config', patchConfiguration)
ipc.of.administration.on('set-config', setConfiguration)
}
function patchConfiguration(configurationPatch) {
_.set(module.exports, configurationPatch.key, configurationPatch.value)
}
function setConfiguration(config) {
module.exports = config
}