2020-05-03 17:46:26 +02:00
const MINIMUM_DISTANCE = process . env . MINIMUM_DISTANCE ? Number ( process . env . MINIMUM_DISTANCE ) : 64 ;
const GROUP_RADIUS = process . env . GROUP_RADIUS ? Number ( process . env . GROUP_RADIUS ) : 48 ;
2020-09-11 09:56:05 +02:00
const ALLOW_ARTILLERY = process . env . ALLOW_ARTILLERY ? process . env . ALLOW_ARTILLERY == 'true' : false ;
2020-11-05 11:25:35 +01:00
const ADMIN_API_URL = process . env . ADMIN_API_URL || '' ;
2020-10-13 09:37:38 +02:00
const ADMIN_API_TOKEN = process . env . ADMIN_API_TOKEN || 'myapitoken' ;
2020-09-30 14:42:35 +02:00
const CPU_OVERHEAT_THRESHOLD = Number ( process . env . CPU_OVERHEAT_THRESHOLD ) || 80 ;
2020-10-19 12:07:05 +02:00
const JITSI_URL : string | undefined = ( process . env . JITSI_URL === '' ) ? undefined : process . env . JITSI_URL ;
const JITSI_ISS = process . env . JITSI_ISS || '' ;
2020-10-16 19:13:26 +02:00
const SECRET_JITSI_KEY = process . env . SECRET_JITSI_KEY || '' ;
2020-12-14 22:43:05 +01:00
const HTTP_PORT = parseInt ( process . env . HTTP_PORT || '8080' ) || 8080 ;
const GRPC_PORT = parseInt ( process . env . GRPC_PORT || '50051' ) || 50051 ;
export const SOCKET_IDLE_TIMER = parseInt ( process . env . SOCKET_IDLE_TIMER as string ) || 30 ; // maximum time (in second) without activity before a socket is closed
2021-02-16 09:58:08 +01:00
export const TURN_STATIC_AUTH_SECRET = process . env . TURN_STATIC_AUTH_SECRET || '' ;
2021-04-14 15:36:25 +02:00
export const MAX_PER_GROUP = parseInt ( process . env . MAX_PER_GROUP || '4' ) ;
2020-04-04 17:22:02 +02:00
export {
2020-05-03 16:56:19 +02:00
MINIMUM_DISTANCE ,
2020-09-17 18:08:20 +02:00
ADMIN_API_URL ,
ADMIN_API_TOKEN ,
2020-12-14 22:43:05 +01:00
HTTP_PORT ,
GRPC_PORT ,
2020-09-11 09:56:05 +02:00
GROUP_RADIUS ,
2020-09-17 18:08:20 +02:00
ALLOW_ARTILLERY ,
2020-09-30 14:42:35 +02:00
CPU_OVERHEAT_THRESHOLD ,
2020-10-19 12:07:05 +02:00
JITSI_URL ,
JITSI_ISS ,
2020-10-16 19:13:26 +02:00
SECRET_JITSI_KEY
2020-09-30 14:42:35 +02:00
}