feat(rpc): create type-safe client with AppType

This commit is contained in:
ngc2207 2025-01-31 16:37:28 +08:00
parent 0b624f0873
commit e3dac30eaa

4
src/lib/rpc.ts Normal file
View File

@ -0,0 +1,4 @@
import { hc } from "hono/client";
import { AppType } from "@/app/api/[[...route]]/route";
export const client = hc<AppType>(process.env.NEXT_PUBLIC_APP_URL!);