level-up/backend/trpc/base.ts
Moritz Ruth 88f0632194
All checks were successful
Build / build (push) Successful in 1m14s
Update dependencies, containerize, add build workflow
2025-03-03 00:35:21 +01:00

17 lines
No EOL
364 B
TypeScript

import { initTRPC } from "@trpc/server"
import type { Response } from "express"
import superjson from "superjson"
export interface Context {
res?: Response
}
export async function createContext(res: Response | undefined): Promise<Context> {
return {
res
}
}
export const t = initTRPC.context<Context>().create({
transformer: superjson
})