1 | const config = {
|
2 | environment: process.env.ENVIRONMENT || 'development',
|
3 |
|
4 | api: {
|
5 | prefix: process.env.API_PREFIX || '',
|
6 | blacklistToken: (process.env.API_BLACKLIST_TOKEN || '').split(','),
|
7 | blacklistReferrer: (process.env.API_BLACKLIST_REFERRER || '').split(','),
|
8 | },
|
9 |
|
10 | forceHttps: process.env.FORCE_HTTPS ? JSON.parse(process.env.FORCE_HTTPS) : false,
|
11 |
|
12 | session: {
|
13 | secret: process.env.SESSION_SECRET || 'change_me',
|
14 | ttl: parseInt(process.env.SESSION_TTL || 7200, 10),
|
15 | },
|
16 |
|
17 | cache: {
|
18 | enabled: process.env.CACHE_ENABLED ? JSON.parse(process.env.CACHE_ENABLED) : false,
|
19 | ttl: parseInt(process.env.CACHE_TTL || 30, 10) * 60,
|
20 | compress: process.env.CACHE_COMPRESS ? JSON.parse(process.env.CACHE_COMPRESS) : false,
|
21 | memory: {
|
22 | max: parseInt(process.env.CACHE_MEMORY_MAX || 128, 10) * 1000 * 1000,
|
23 | },
|
24 | },
|
25 |
|
26 | redis: {
|
27 | url: process.env.REDIS_URL,
|
28 | host: process.env.REDIS_HOST,
|
29 | port: process.env.REDIS_PORT,
|
30 | password: process.env.REDIS_PASSWORD,
|
31 | db: parseInt(process.env.REDIS_DB || 0, 10),
|
32 | },
|
33 |
|
34 | logentriesToken: process.env.LOGENTRIES_TOKEN,
|
35 | };
|
36 |
|
37 | module.exports = config;
|