Files
trpc-nuxt/playground/plugins/trpc-client.ts
Robert Soriano a04ed72c45 update playground
2022-10-29 19:20:47 -07:00

19 lines
347 B
TypeScript

import { httpBatchLink } from '@trpc/client'
import { createTRPCNuxtProxyClient } from 'trpc-nuxt/client'
export default defineNuxtPlugin(() => {
const client = createTRPCNuxtProxyClient({
links: [
httpBatchLink({
url: 'http://localhost:3000/trpc',
}),
],
})
return {
provide: {
client,
},
}
})