-
Notifications
You must be signed in to change notification settings - Fork 6
/
config.js
62 lines (59 loc) · 1.73 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
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
/* eslint no-process-env: 0 */
/* eslint no-inline-comments: 0 */
/* eslint camelcase: 0 */
'use strict';
require('dotenv').config();
const env = process.env.NODE_ENV;
const useMocks = process.env.USE_MOCKS === 'true' || !env;
const port = process.env.PORT;
module.exports = {
env: env,
csp: {
imgSrc: ['data:']
},
useMocks: useMocks,
dateTimeFormat: 'DD-MM-YYYY, hh:mma',
port: port,
session: {
secret: process.env.SESSION_SECRET,
ttl: process.env.SESSION_TTL,
name: process.env.SESSION_KEY
},
redis: {
port: process.env.REDIS_PORT,
host: process.env.REDIS_HOST,
password: process.env.REDIS_PASSWORD
},
email: {
from: process.env.FROM_ADDRESS,
replyTo: process.env.REPLY_TO,
region: process.env.EMAIL_REGION,
transport: process.env.EMAIL_TRANSPORT,
caseworker: process.env.CASEWORKER_EMAIL,
notifyApiKey: process.env.NOTIFY_KEY,
notifyTemplate: process.env.NOTIFY_TEMPLATE
},
feedbackUrl: process.env.FEEDBACK_URL,
referrals: {
caseworker: process.env.REFERRALS_EMAIL,
notifyApiKey: process.env.NOTIFY_KEY,
notifyTemplate: process.env.NOTIFY_TEMPLATE
},
hosts: {
acceptanceTests: process.env.ACCEPTANCE_HOST_NAME || `http://localhost:${port}`
},
upload: {
maxFileSize: '100mb',
// if mocks set use file service served up by app otherwise use filevault's port 3000
hostname: !useMocks && process.env.FILE_VAULT_URL ?
process.env.FILE_VAULT_URL :
`http://localhost:${useMocks ? port : 3000}/file`
},
keycloak: {
token: process.env.KEYCLOAK_TOKEN_URL,
username: process.env.KEYCLOAK_USERNAME,
password: process.env.KEYCLOAK_PASSWORD,
clientId: process.env.KEYCLOAK_CLIENT_ID,
secret: process.env.KEYCLOAK_SECRET
}
};