mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-06 03:20:13 +08:00
feat: integrate trpc to app
This commit is contained in:
1 parent
529869671c
commit
55a41dd3b5
7 files changed
+50
-6
No files matched your search
@@ -0,0 +1,16 @@
|
||||
import { createTRPCClient, httpBatchLink } from '@trpc/client'
|
||||
import type { AppRouter } from 'server/src/routers'
|
||||
|
||||
export const trpc = createTRPCClient<AppRouter>({
|
||||
links: [
|
||||
httpBatchLink({
|
||||
url: '/trpc',
|
||||
// You can pass any HTTP headers you wish here
|
||||
// async headers() {
|
||||
// return {
|
||||
// authorization: getAuthCookie(),
|
||||
// }
|
||||
// },
|
||||
}),
|
||||
],
|
||||
})
|
||||
Reference in new issue
Block a user