mirror of
https://github.com/ArthurDanjou/trpc-nuxt.git
synced 2026-01-14 12:14:40 +01:00
feat: add file routing option
This commit is contained in:
17
examples/custom/server/trpc/context.ts
Normal file
17
examples/custom/server/trpc/context.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
/* eslint-disable @typescript-eslint/no-unused-vars */
|
||||
import type { inferAsyncReturnType } from '@trpc/server'
|
||||
import type { H3Event } from 'h3'
|
||||
|
||||
export type Context = inferAsyncReturnType<typeof createContext>
|
||||
|
||||
/**
|
||||
* Creates context for an incoming request
|
||||
* @link https://trpc.io/docs/context
|
||||
*/
|
||||
export function createContext (
|
||||
opts: H3Event
|
||||
) {
|
||||
// for API-response caching see https://trpc.io/docs/caching
|
||||
|
||||
return {}
|
||||
}
|
||||
Reference in New Issue
Block a user