Next.js Discord

Discord Forum

trpc Subscriptions

Answered
Giant panda posted this in #help-forum
Open in Discord
Avatar
Giant pandaOP
Do trpc Subscriptions/wss work if i deploy Next.js to serverless (Vercel for eg.)?
Answered by James4u
Serverless functions typically do not support long-lived connections such as WebSockets due to their ephemeral nature.
View full answer

3 Replies

Avatar
Serverless functions typically do not support long-lived connections such as WebSockets due to their ephemeral nature.
Answer
Avatar
Giant pandaOP
got it, so I would need to make a separate server (like express for eg.) and hook it up with trpc?
Avatar
exactly