blob: 70c065858d54f29c218bff65e8bf9caeb0354733 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
import { httpBatchLink } from "@trpc/client";
import { createTRPCNext } from "@trpc/next";
import type { AppRouter } from "../server/routers/_app";
import serverConfig from "@/lib/config";
export const trpc = createTRPCNext<AppRouter>({
config(_opts) {
return {
links: [
httpBatchLink({
url: `${serverConfig.api_url}/api/trpc`,
}),
],
};
},
});
|