aboutsummaryrefslogtreecommitdiff
path: root/.env.example
diff options
context:
space:
mode:
authorRitesh Ghosh <[email protected]>2024-10-06 01:13:23 +0530
committerGitHub <[email protected]>2024-10-06 01:13:23 +0530
commit46f688ac12a99b8fb145b0745dd4cc6babff1e1e (patch)
tree9560dd057822069a2162ef01a1118f3ac05e6d07 /.env.example
parent55810ccf2372209f9b46c96ac12811e5a05f7961 (diff)
downloadaniwatch-api-46f688ac12a99b8fb145b0745dd4cc6babff1e1e.tar.xz
aniwatch-api-46f688ac12a99b8fb145b0745dd4cc6babff1e1e.zip
Aniwatch API Version 2 (#66)
BREAKING CHANGE: * chore: remove files that are not necessary for api v2 * test: update existing tests to use pkg * feat: organized aniwatch api envs and add more info about them * feat: update tsconfig to include strict noUnsed params * feat(api homepage): revamp api home page * feat: update wani kuni image * feat: add dot img * feat: use hono cors * feat: use hono rate limiter * build: remove unnecessary deps, add ones needed and update description * feat: add hianime routes and their handlers * feat: update vercel deployment file * docs: update logo and scraper docs, add envs section * feat: update main server file * feat: update peronal deployments caution section
Diffstat (limited to '.env.example')
-rw-r--r--.env.example26
1 files changed, 21 insertions, 5 deletions
diff --git a/.env.example b/.env.example
index 817a534..c9e59b3 100644
--- a/.env.example
+++ b/.env.example
@@ -1,7 +1,23 @@
-DOMAIN="aniwatchtv.to"
-PORT=4000
-CORS_ALLOWED_ORIGINS=https://your-production-domain.com,https://another-trusted-domain.com
+# port number of the aniwatch api
+ANIWATCH_API_PORT=4000
+
+# env to control allowed origins
+ANIWATCH_API_CORS_ALLOWED_ORIGINS=https://your-production-domain.com,https://another-trusted-domain.com
# RATE LIMIT
-WINDOW_MS=1800000 # duration to track requests (in milliseconds) for rate limiting. here, 30*60*1000 = 1800000 = 30 minutes
-MAX=70 # maximum number of requests in this timeperiod
+# duration to track requests (in milliseconds) for rate limiting. here, 30*60*1000 = 1800000 = 30 minutes
+ANIWATCH_API_WINDOW_MS=1800000
+# maximum number of requests in this timeperiod
+ANIWATCH_API_MAX_REQS=70
+
+# CAUTION:
+# For personal deployments, if you wanna have rate limitting
+# in your application, then set this env to your deployed
+# instance's hostname, otherwise don't set or have this env at all.
+# If you set this env to an incorrect value, you may face other issues.
+
+# ANIWATCH_API_HOSTNAME="api-aniwatch.onrender.com"
+
+
+# NOTE: this env is "required" for vercel deployments
+# ANIWATCH_VERCEL_DEPLOYMENT=<true or any non zero value>