aboutsummaryrefslogtreecommitdiff
path: root/src/utils
diff options
context:
space:
mode:
authorRitesh Ghosh <[email protected]>2024-03-03 20:04:22 +0530
committerRitesh Ghosh <[email protected]>2024-03-03 20:04:22 +0530
commiteea621b17a14363b003382ea237cd43361bc5df9 (patch)
tree68cc67df7709baa3ff4ab938d9136b95cce08f43 /src/utils
parent5562885184e892743f14df199a21d9521deeb989 (diff)
parentd779537275ebd9395189f9178b0422ad0439851f (diff)
downloadaniwatch-api-eea621b17a14363b003382ea237cd43361bc5df9.tar.xz
aniwatch-api-eea621b17a14363b003382ea237cd43361bc5df9.zip
feat: merge 'main' of https://github.com/ghoshRitesh12/aniwatch-api
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/constants.ts8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/utils/constants.ts b/src/utils/constants.ts
index 0d95751..08499ee 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,8 +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";
-// previously aniwatch.to || aniwatchtv.to
-export const SRC_BASE_URL = "https://hianime.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`;