forked from orange1337/eosweb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.example.js
177 lines (157 loc) · 4.54 KB
/
config.example.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
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
/*
App configuration example created by eoswebnetbp1 (31.08.18)
*/
const path = require('path');
let config = {};
// production mod
config.PROD = false;
//swagger-stats-lions
config.saveRequestsMetrics = true;
// mongo uri and options
config.MONGO_URI = process.env.MONGO_URI || 'mongodb://localhost:27017/EOSweb';
config.MONGO_OPTIONS = {
socketTimeoutMS: 30000,
keepAlive: true,
reconnectTries: 30000,
useNewUrlParser: true
};
// cron processes (aggregation of main stat - actions, transactions, accounts, analytics)
config.CRON = false;
config.CRON_API = 'http://bp.cryptolions.io';
// anable TPS APS daemon aggregation
config.TPS_ENABLE = true;
config.MAX_TPS_TIME_UPDATE = 5000; // time of break between reload (leave by default)
// enable for private network (daemon for Actions, Accounts)
config.CUSTOM_GLOBA_STATS = false;
// global front customizations
config.globalFront = {
coin: 'EOS',
logo: '/assets/images/eos_logo.png',
name: {
big: 'eos',
small: 'web'
},
nets: [{ name: 'Mainnet', url: 'https://eosweb.net', active: true },
{ name: 'Jungle', url: 'https://jungle.eosweb.net', active: false }],
disableNets: false,
voteDonationAcc: 'eoswebnetbp1',
disableVoteDonation: false,
version: '2.1.0'
};
// producer json name
config.producerJSON = 'bp.json';
// scatter wallet
config.walletAPI = {
host: 'nodes.get-scatter.com',
port: '',
protocol: 'https',
chainId: 'aca376f206b8fc25a6ed44dbdc66547c36c6c33e3a119ffbeaef943642f0e906'
};
// telegram alert bot
config.telegram = {
ON: false,
TOKEN: '',
TIME_UPDATE: 5000
};
// reserve nodes
config.endpoints = ['https://eos.greymass.com', 'http://bp.cryptolions.io', 'http://eosbp-0.atticlab.net'];
// eosjs
config.eosConfig = {
chainId: "038f4b0fc8ff18a4f0842a8f0564611f6e96e8535901dd45e43ac8691a1c4dca",
keyProvider: "",
httpEndpoint: config.endpoints[0],
expireInSeconds: 60,
broadcast: true,
debug: false,
sign: true,
logger: {
//log: console.log,
error: console.error
}
};
// api url for producers list
config.customChain = 'https://nodes.get-scatter.com';
// api url for history
config.historyChain = 'https://eos.greymass.com';
// tokens api
config.tokensAPI = 'http://tokenapi.eoswatch.info/api/account/b1';
config.apiV = 'v1'; // api version
config.RAM_UPDATE = 5 * 60 * 1000; // time for ram update - /api/api.*.socket
config.HISTORY_UPDATE = 5 * 60 * 1000; // time for stats update - /api/api.*.socket
config.MAX_BUFFER = 500000; // max buffer size for child processes (kb) - /crons
config.blockUpdateTime = 900; // mainpage upades frequency - /api/api.*.socket in ml sec
config.offsetElementsOnMainpage = 10; // blocks on mainpage
config.limitAsync = 30; // max threads for async.js module
config.updateTPS = 1000;
// log4js
config.logger = {
appenders: {
out: {
type: 'stdout'
},
server: {
type: 'file',
filename: path.join(__dirname, './server/logs/server.log'),
},
socket_io: {
type: 'file',
filename: path.join(__dirname, './server/logs/socket_io.log'),
},
accounts_daemon: {
type: 'file',
filename: path.join(__dirname, './server/logs/accounts_daemon.log'),
},
accounts_analytics: {
type: 'file',
filename: path.join(__dirname, './server/logs/accounts_analytics.log'),
},
global_stat: {
type: 'file',
filename: path.join(__dirname, './server/logs/global_stat.log'),
},
ram_bot: {
type: 'file',
filename: path.join(__dirname, './server/logs/ram_bot.log'),
}
},
categories: {
default: {
appenders: ['out'],
level: 'trace'
},
server: {
appenders: ['out', 'server'],
level: 'trace'
},
socket_io: {
appenders: ['out', 'socket_io'],
level: 'trace'
},
accounts_daemon: {
appenders: ['out', 'accounts_daemon'],
level: 'trace'
},
accounts_analytics: {
appenders: ['out', 'accounts_analytics'],
level: 'trace'
},
global_stat: {
appenders: ['out', 'global_stat'],
level: 'trace'
},
ram_bot: {
appenders: ['out', 'ram_bot'],
level: 'trace'
}
}
};
// slack notifications
config.loggerSlack = {
alerts: {
type: '',
token: '',
channel_id: '',
username: '',
}
};
module.exports = config;