tRPCttRPC
Powered by
functiondjF
tRPC•5mo ago•
1 reply
functiondj

Shorten /app/api/trpc/[trpc]/route.ts

The docs suggest
/app/api/trpc/[trpc]/route.ts
/app/api/trpc/[trpc]/route.ts
to register the tRPC handler in a Next.js project.
Can I shorten this to e.g.
/app/api/route.ts
/app/api/route.ts
?

If yes, what's the
endpoint
endpoint
that I need to pass to
fetchRequestHandler
fetchRequestHandler
and what's the
url
url
I need to pass to
httpBatchLink
httpBatchLink
?
tRPCJoin
Move Fast & Break Nothing. End-to-end typesafe APIs made easy.
5,015Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

Nextjs Proxy an exteral TRPC api via pages/api/trpc/[trpc].ts ?
Ahmed EidAAhmed Eid / ❓-help
12mo ago
Can we use trpc route inside another trpc route?
Ali SamadiAAli Samadi / ❓-help
3mo ago
TRPC Nextjs App Router API Base URL
MikeyMMikey / ❓-help
3y ago