tRPCttRPC
Powered by
IndeedI
tRPC•2y ago•
2 replies
Indeed

Serving files with TRPC and Express

Hi!

Is there any way to serve files using express while using trpc typed way?
As in using

app.get<{filename: string}>('/assets', /* send file response */ );
app.get<{filename: string}>('/assets', /* send file response */ );


but also being able to do on the client

trpc.assets.query({filename: 'test'})
trpc.assets.query({filename: 'test'})


instead of having to split between two solutions
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

Express.JS and tRPC
xDr.Ma[L]eKXxDr.Ma[L]eK / ❓-help
2y ago
Express tRPC NextJS
MugetsuMMugetsu / ❓-help
3y ago
how to build tRPC and Prisma with express?
backboneBbackbone / ❓-help
3y ago
tRPC Express server with Next.js
sumatokenSsumatoken / ❓-help
3y ago