2021-05-06 04:49:34 +12:00
|
|
|
function isTest() {
|
|
|
|
return (
|
|
|
|
process.env.NODE_ENV === "jest" ||
|
|
|
|
process.env.NODE_ENV === "cypress" ||
|
|
|
|
process.env.JEST_WORKER_ID != null
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
2021-04-15 01:13:48 +12:00
|
|
|
module.exports = {
|
|
|
|
JWT_SECRET: process.env.JWT_SECRET,
|
|
|
|
COUCH_DB_URL: process.env.COUCH_DB_URL,
|
2021-08-18 22:23:28 +12:00
|
|
|
COUCH_DB_USERNAME: process.env.COUCH_DB_USER,
|
2021-08-18 01:11:03 +12:00
|
|
|
COUCH_DB_PASSWORD: process.env.COUCH_DB_PASSWORD,
|
2021-04-15 01:13:48 +12:00
|
|
|
SALT_ROUNDS: process.env.SALT_ROUNDS,
|
2021-04-28 04:29:05 +12:00
|
|
|
REDIS_URL: process.env.REDIS_URL,
|
|
|
|
REDIS_PASSWORD: process.env.REDIS_PASSWORD,
|
2021-05-07 06:27:24 +12:00
|
|
|
MINIO_ACCESS_KEY: process.env.MINIO_ACCESS_KEY,
|
|
|
|
MINIO_SECRET_KEY: process.env.MINIO_SECRET_KEY,
|
|
|
|
MINIO_URL: process.env.MINIO_URL,
|
2021-05-12 02:23:03 +12:00
|
|
|
INTERNAL_API_KEY: process.env.INTERNAL_API_KEY,
|
2021-08-05 20:59:08 +12:00
|
|
|
MULTI_TENANCY: process.env.MULTI_TENANCY,
|
2021-09-20 22:26:19 +12:00
|
|
|
ACCOUNT_PORTAL_URL: process.env.ACCOUNT_PORTAL_URL,
|
|
|
|
SELF_HOSTED: !!parseInt(process.env.SELF_HOSTED),
|
2021-05-06 04:49:34 +12:00
|
|
|
isTest,
|
2021-07-15 23:55:35 +12:00
|
|
|
_set(key, value) {
|
|
|
|
process.env[key] = value
|
|
|
|
module.exports[key] = value
|
|
|
|
},
|
2021-04-15 01:13:48 +12:00
|
|
|
}
|