diff options
Diffstat (limited to 'utils')
-rw-r--r-- | utils/env.tsx | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/utils/env.tsx b/utils/env.tsx index 1894c1b..fe56701 100644 --- a/utils/env.tsx +++ b/utils/env.tsx @@ -1,9 +1,22 @@ import assert from './assert'; -const DISPLAY_DOMAIN = process.env.DISPLAY_DOMAIN; +const SITE_DOMAIN = process.env.SITE_DOMAIN; -assert(DISPLAY_DOMAIN !== undefined, 'Please set DISPLAY_DOMAIN'); +enum SiteDomain { + EXANDERIO = "exander.io", + FLU0R1NENET = "flu0r1ne.net" +}; + +assert( + SITE_DOMAIN === SiteDomain.EXANDERIO || + SITE_DOMAIN === SiteDomain.FLU0R1NENET, + `Please set SITE_DOMAIN` +); + +const DISPLAY_DOMAIN = SITE_DOMAIN === SiteDomain.EXANDERIO ? 'al.exander.io' : 'flu0r1ne.net'; export { - DISPLAY_DOMAIN + SITE_DOMAIN, + SiteDomain, + DISPLAY_DOMAIN, }; |