soline init
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
import {
|
||||
createTRPCProxyClient,
|
||||
httpBatchLink,
|
||||
loggerLink,
|
||||
} from '@trpc/client';
|
||||
import { AppRouter } from "~/trpc/api/root";
|
||||
import { getBaseUrl } from '~/utils/url';
|
||||
|
||||
|
||||
// create the client, export it
|
||||
export const api = createTRPCProxyClient<AppRouter>({
|
||||
links: [
|
||||
// will print out helpful logs when using client
|
||||
// loggerLink(),
|
||||
// identifies what url will handle trpc requests
|
||||
httpBatchLink({ url: `${getBaseUrl()}/api/trpc` })
|
||||
],
|
||||
});
|
||||
Reference in New Issue
Block a user