-
Notifications
You must be signed in to change notification settings - Fork 29
/
Copy pathconf.js
41 lines (36 loc) · 1.16 KB
/
conf.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
/**
* @name Conf
*
* @desc Set of configurations
*/
const config = require('../config/config.json')
const label = require('../config/label.js')
let custom = config
const {
BIGBLUEBOT_HOST,
BIGBLUEBOT_SECRET,
BIGBLUEBOT_ROOM,
BIGBLUEBOT_BOTS,
BIGBLUEBOT_WAIT,
BIGBLUEBOT_LIFE,
BIGBLUEBOT_BROWSER,
BIGBLUEBOT_POOL,
BIGBLUEBOT_ENDPOINT,
BIGBLUEBOT_TOKEN,
BIGBLUEBOT_LOG
} = process.env;
if (BIGBLUEBOT_HOST) custom.url.host = BIGBLUEBOT_HOST
if (BIGBLUEBOT_ROOM) custom.url.meeting.name = BIGBLUEBOT_ROOM
if (BIGBLUEBOT_SECRET) custom.api.secret = BIGBLUEBOT_SECRET
if (BIGBLUEBOT_BOTS) custom.bot.population = parseInt(BIGBLUEBOT_BOTS)
if (BIGBLUEBOT_WAIT) custom.bot.wait = parseInt(BIGBLUEBOT_WAIT)
if (BIGBLUEBOT_LIFE) custom.bot.life = parseInt(BIGBLUEBOT_LIFE)
if (BIGBLUEBOT_BROWSER) custom.browser.path = BIGBLUEBOT_BROWSER
if (BIGBLUEBOT_POOL) custom.browser.pool.population = parseInt(BIGBLUEBOT_POOL)
if (BIGBLUEBOT_ENDPOINT) custom.browser.endpoint = BIGBLUEBOT_ENDPOINT
if (BIGBLUEBOT_TOKEN) custom.browser.token = BIGBLUEBOT_TOKEN
if (BIGBLUEBOT_LOG) custom.logger.level = BIGBLUEBOT_LOG
module.exports = {
config: custom,
label: label
}