2020-11-13 18:00:22 +01:00
const SECRET_KEY = process . env . SECRET_KEY || "THECODINGMACHINE_SECRET_KEY" ;
2021-06-24 10:09:10 +02:00
const ALLOW_ARTILLERY = process . env . ALLOW_ARTILLERY ? process . env . ALLOW_ARTILLERY == "true" : false ;
const API_URL = process . env . API_URL || "" ;
const ADMIN_API_URL = process . env . ADMIN_API_URL || "" ;
2021-09-05 18:17:49 +02:00
const ADMIN_URL = process . env . ADMIN_URL || "" ;
2021-06-24 10:09:10 +02:00
const ADMIN_API_TOKEN = process . env . ADMIN_API_TOKEN || "myapitoken" ;
2020-11-13 18:00:22 +01:00
const CPU_OVERHEAT_THRESHOLD = Number ( process . env . CPU_OVERHEAT_THRESHOLD ) || 80 ;
2021-06-24 10:09:10 +02:00
const JITSI_URL : string | undefined = process . env . JITSI_URL === "" ? undefined : process . env . JITSI_URL ;
const JITSI_ISS = process . env . JITSI_ISS || "" ;
const SECRET_JITSI_KEY = process . env . SECRET_JITSI_KEY || "" ;
const PUSHER_HTTP_PORT = parseInt ( process . env . PUSHER_HTTP_PORT || "8080" ) || 8080 ;
2021-09-10 18:30:36 +02:00
export const SOCKET_IDLE_TIMER = parseInt ( process . env . SOCKET_IDLE_TIMER as string ) || 120 ; // maximum time (in second) without activity before a socket is closed. Should be greater than 60 seconds in order to cope for Chrome intensive throttling (https://developer.chrome.com/blog/timer-throttling-in-chrome-88/#intensive-throttling)
2020-11-13 18:00:22 +01:00
2021-07-27 16:37:01 +02:00
export const FRONT_URL = process . env . FRONT_URL || "http://localhost" ;
export const OPID_CLIENT_ID = process . env . OPID_CLIENT_ID || "" ;
export const OPID_CLIENT_SECRET = process . env . OPID_CLIENT_SECRET || "" ;
export const OPID_CLIENT_ISSUER = process . env . OPID_CLIENT_ISSUER || "" ;
2020-11-13 18:00:22 +01:00
export {
SECRET_KEY ,
API_URL ,
ADMIN_API_URL ,
2021-09-05 18:17:49 +02:00
ADMIN_URL ,
2020-11-13 18:00:22 +01:00
ADMIN_API_TOKEN ,
ALLOW_ARTILLERY ,
CPU_OVERHEAT_THRESHOLD ,
JITSI_URL ,
JITSI_ISS ,
2021-01-04 18:23:33 +01:00
SECRET_JITSI_KEY ,
2021-06-24 10:09:10 +02:00
PUSHER_HTTP_PORT ,
} ;