feat(api): add isomorphic Eden Treaty client for end-to-end type safety
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user