mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-16 22:27:26 +01:00
16 lines
331 B
JavaScript
16 lines
331 B
JavaScript
import nconf from 'nconf';
|
|
import cluster from 'cluster';
|
|
|
|
const IS_PROD = nconf.get('IS_PROD');
|
|
const IS_DEV = nconf.get('IS_DEV');
|
|
const CORES = Number(nconf.get('WEB_CONCURRENCY')) || 0;
|
|
|
|
const ENABLE_CLUSTER = CORES !== 0 && cluster.isMaster && (IS_DEV || IS_PROD);
|
|
|
|
export {
|
|
IS_PROD,
|
|
IS_DEV,
|
|
CORES,
|
|
ENABLE_CLUSTER,
|
|
};
|