xeon06X
tRPC4y ago
1 reply
xeon06

Using `fetchRequestHandler` with other routes?

Hey everyone, I'm trying to use the fetchRequestHandler with a HatTip server, but all the examples seem to give tRPC entire control of all server responses. I actually want to serve other things besides tRPC routes. Anyone know how I could go about this?

So far I've tried this, as well as changing the endpoint to "/" and "". Always the same result, 404s on /trpc

app.use("/trpc", ({ request }) =>
  fetchRequestHandler({
    endpoint: "/trpc",
    req: request,
    router: appRouter,
    createContext,
  })
)
Was this page helpful?