feat(api): add isomorphic Eden Treaty client for end-to-end type safety

This commit is contained in:
2026-04-25 13:17:59 +08:00
parent 52ab8484cf
commit b2a9094819
+7
View File
@@ -0,0 +1,7 @@
import { treaty } from "@elysia/eden"
import { app } from "@/app/api/[[...slugs]]/route"
export const api =
typeof process !== "undefined"
? treaty(app).api
: treaty<typeof app>("localhost:3000").api