File size: 1,046 Bytes
d092f57 eee0e71 d092f57 |
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 |
export function getSiteName(): string {
if ("SITE_NAME" in process.env) {
return <string>process.env.SITE_NAME
}
console.warn("ENV 'SITE_NAME' has no value, using default:", "Web-SyncPlay")
return "Web-SyncPlay"
}
export function getSiteDomain(): string {
if ("PUBLIC_DOMAIN" in process.env) {
const domain = <string>process.env.PUBLIC_DOMAIN
return domain.replace(/\/+$/, "")
}
console.warn(
"ENV 'PUBLIC_DOMAIN' has no value, using default:",
"https://web-syncplay.de"
)
return "https://web-syncplay.de"
}
export function getRedisURL(): string {
if ("REDIS_URL" in process.env) {
return <string>process.env.REDIS_URL
}
console.warn(
"ENV 'REDIS_URL' has no value, using default:",
"redis://localhost:6379"
)
return "redis://localhost:6379"
}
export function getDefaultSrc(): string {
if ("DEFAULT_SRC" in process.env) {
return <string>process.env.DEFAULT_SRC
}
// console.warn("ENV 'DEFAULT_SRC' has no value, using no src")
return "https://youtu.be/c-FKlE3_kHo"
}
|