xeon06
xeon063y ago

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,
})
)
app.use("/trpc", ({ request }) =>
fetchRequestHandler({
endpoint: "/trpc",
req: request,
router: appRouter,
createContext,
})
)
1 Reply
xeon06
xeon06OP3y ago
I'm an idiot, needed a wildcard for my route

Did you find this page helpful?