forked from mzhilyaev/pfeed
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.js
52 lines (49 loc) · 1.09 KB
/
config.js
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
var config = {
rootDir: "/Users/maximzhilyaev/pfeed",
workDir: "work",
mongo: {
host: "localhost",
port: 27017
},
download: {
interval: 20000,
seqIdFile: "seqId",
docNumber: 500,
outputDir: "download",
hostsOutputDir: "hostDocs",
runDir: "run",
commandFile: "command",
url: "http://metabase.moreover.com/api/v10/articles",
apiKey: "",
database: "moreover",
drainInterval: 60000,
},
stats: {
statsOutputDir: "webapp/public/stats",
},
useSubdomains: {
"wordpress.com": true,
"livejournal.com": true,
"blogspot.com": true,
},
docs: {
database: "moreover",
collection: "docs",
annotateOnInsert: false,
},
hosts: {
database: "moreover",
collection: "hosts",
},
}
function initConfig() {
config.subRevHosts = [];
config.subRevHostsMap = {};
Object.keys(config.useSubdomains).forEach(function(domain) {
var revHost = domain.split('').reverse().join('') + ".";
config.subRevHosts.push(revHost);
config.subRevHostsMap[revHost] = domain;
});
};
initConfig();
module.exports = config;