-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathConfig.js
37 lines (37 loc) · 1.04 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
// 取得 process.env 資料
require('dotenv').config();
let config
try {
config = require('./../../Config');
} catch (error) {
config = {
global: {
authToken: process.env.hosting_authToken,
discord: {
token: process.env.discord_token,
clientID: process.env.discord_clientID,
clientSECRET: process.env.discord_clientSECRET,
},
logLevel: {
debug: true,
error: true,
warn: true,
info: true,
log: true,
}
},
hosting: {
host: process.env.hosting_host || "localhost",
port: Number(process.env.hosting_port || 4444),
totalMachines: 4,
totalShards: 20,
shardsPerCluster: 4,
},
web: {
agent: 'dashboard',
host: process.env.web_host || 'localhost',
port: Number(process.env.web_port || 3000),
},
};
}
module.exports = config;