import{createSolidAPIHandler}from"solid-start-trpc";consthandler=createSolidAPIHandler({router: appRouter,createContext: ()=>null,});exportconstget=handler;exportconstpost=handler;// for version 0.1.6 +exportconstGET=handler;exportconstPOST=handler;constcreateContext=(opts)=>({req: opts.req,res: opts.res});consthandler=createSolidAPIHandler({router: appRouter,
createContext,responseMeta: ({ ctx })=>{if(ctx?.req.headers.get("x-random-header")){return{headers: {"x-random-header": `hello-${ctx.req.headers.get("x-random-header")}`,},};}return{};},});