aboutsummaryrefslogtreecommitdiff
path: root/src/utils
diff options
context:
space:
mode:
authorAyush Choudhary <[email protected]>2024-02-28 12:42:05 +0000
committerAyush Choudhary <[email protected]>2024-02-28 12:42:05 +0000
commitc3ee76a06b7527548a4699db3d9fa55c800c767c (patch)
treedc10db6c623424ad3016bbddf50cdccaf44f1041 /src/utils
parent10ab4ad9ebfbe24a0c2b524517a922524fe91e86 (diff)
downloadaniwatch-api-c3ee76a06b7527548a4699db3d9fa55c800c767c.tar.xz
aniwatch-api-c3ee76a06b7527548a4699db3d9fa55c800c767c.zip
Added `.env.example`
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/constants.ts7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/utils/constants.ts b/src/utils/constants.ts
index 0813a5d..7516d25 100644
--- a/src/utils/constants.ts
+++ b/src/utils/constants.ts
@@ -1,3 +1,6 @@
+import { config } from "dotenv";
+config();
+
export const ACCEPT_ENCODING_HEADER = "gzip, deflate, br";
export const USER_AGENT_HEADER =
@@ -6,7 +9,9 @@ export const USER_AGENT_HEADER =
export const ACCEPT_HEADER =
"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9";
-export const SRC_BASE_URL = "https://aniwatchtv.to";
+const DOMAIN = process.env.DOMAIN || 'aniwatchtv.to'
+
+export const SRC_BASE_URL = `https://${DOMAIN}`;
export const SRC_AJAX_URL = `${SRC_BASE_URL}/ajax`;
export const SRC_HOME_URL = `${SRC_BASE_URL}/home`;
export const SRC_SEARCH_URL = `${SRC_BASE_URL}/search`;