aboutsummaryrefslogtreecommitdiff
path: root/api
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 /api
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 'api')
-rw-r--r--api/index.ts9
1 files changed, 8 insertions, 1 deletions
diff --git a/api/index.ts b/api/index.ts
index be3392b..15976e3 100644
--- a/api/index.ts
+++ b/api/index.ts
@@ -1,3 +1,10 @@
import app from "../src/server.js";
+import { handle } from "hono/vercel";
-export default app;
+const handler = handle(app);
+
+export const GET = handler;
+export const POST = handler;
+export const PATCH = handler;
+export const PUT = handler;
+export const OPTIONS = handler;