aboutsummaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorflu0r1ne <flu0r1ne@flu0r1ne.net>2023-09-08 01:05:33 -0500
committerflu0r1ne <flu0r1ne@flu0r1ne.net>2023-09-08 01:05:33 -0500
commit7a6357b97f038b6624bf47119935024f0c339968 (patch)
tree26196b9ccda727c10e31c4106f12fc612c858a5a /utils
parent9f53c175d634edcbe20b930c98b826dd04174af8 (diff)
downloadhomepage-7a6357b97f038b6624bf47119935024f0c339968.tar.xz
homepage-7a6357b97f038b6624bf47119935024f0c339968.zip
Rename DISPLAY_DOMAIN to SITE_DOMAIN for consistency
Diffstat (limited to 'utils')
-rw-r--r--utils/env.tsx19
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,
};