Chat with trpc / nextjs / vercel
Hello,
I would like to make a messaging system with trpc and nextjs. I host everything on Vercel so I need it to work in serverless.
https://trpc.io/docs/subscriptions
Is it possible to use this with upstash for example?
Thanks
Subscriptions / WebSockets | tRPC
Using Subscriptions
10 Replies
TomDoesTech
YouTube
Build a Live Chat Application with the T3 Stack - TypeScript, Tailw...
Repository: https://github.com/TomDoesTech/t3-chat
In this view, we build a live chat application with the T3 stack, tRPC, Tailwind & TypeScript.
🌎 Follow me here:
Discord: https://discord.gg/4ae2Esm6P7
Twitter: https://twitter.com/tomdoes_tech
Facebook: https://www.facebook.com/tomdoestech​
Instagram: https://www.instagram.com/tomdoestech​
Ti...
with vercel you won't be able to create a chat-like feature
you can use a websockets provider like pusher
This is what I understood with all my research ( even using services like Pusher, Ably etc it is still not adapted with TRPC ) 😦
Ah, but Pusher and TRPC don't work, do they?
you can send messages to trpc, and from there you send to pusher
and listen to the messages on the client (react)
thanks
Hey mate, can you give me some code example in terms of how to use Pusher or Ably with trpc?
pass the pusher instance in a higher middleware
and in the client use pusher js to subscribe
https://discord.com/channels/966627436387266600/1106927247136411820
A bit more info about that