-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbotfile.js
45 lines (41 loc) · 1.08 KB
/
botfile.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
module.exports = {
/**
* where the content is stored
* you can access this property from `bp.dataLocation`
*/
dataDir: process.env.BOTPRESS_DATA_DIR || './data',
modulesConfigDir: process.env.BOTPRESS_CONFIG_DIR || './modules_config',
disableFileLogs: false,
port: process.env.BOTPRESS_PORT || process.env.PORT || 3000,
optOutStats: false,
notification: {
file: 'notifications.json',
maxLength: 50
},
log: {
file: 'bot.log',
maxSize: 1e6 // 1mb
},
/**
* Access control of admin panel
*/
login: {
enabled: process.env.NODE_ENV === 'production',
tokenExpiry: '6 hours',
password: process.env.BOTPRESS_PASSWORD || 'password',
maxAttempts: 3,
resetAfter: 5 * 60 * 10000 // 5 minutes
},
/**
* Postgres configuration
*/
postgres: {
enabled: process.env.DATABASE === 'postgres',
host: process.env.PG_HOST || '127.0.0.1',
port: process.env.PG_PORT || 5432,
user: process.env.PG_USER || '',
password: process.env.PG_PASSWORD || '',
database: process.env.PG_DB || '',
ssl: process.env.PG_SSL || false
}
}