Socket not received in prod
Unanswered
Masai Lion posted this in #help-forum
Masai LionOP
Hey, in devmode, the frontend of my app receives the websocket without any problem, but in prod mode, it doesnt. Do you know why ? The websocket is sent without any problem. The websocket connection is established without any problem.
7 Replies
@Masai Lion Hey, in devmode, the frontend of my app receives the websocket without any problem, but in prod mode, it doesnt. Do you know why ? The websocket is sent without any problem. The websocket connection is established without any problem.
websockets are not supported in serverless functions. You would need to connect to a microservice using a proxy
@Marchy websockets are not supported in serverless functions. You would need to connect to a microservice using a proxy
Masai LionOP
I dont use any Vercel serverless function
@Masai Lion I dont use any Vercel serverless function
Next.js is a serverless framework, it does not support websockets
You can connect to a websocket microservice, though, if needed
@Marchy Next.js is a serverless framework, it does not support websockets
Masai LionOP
But the connection/disconnection to a websocket works
@Masai Lion But the connection/disconnection to a websocket works
That doesn't mean it's supported.
@Marchy That doesn't mean it's supported.
Masai LionOP
Alright I've implemented Pusher Channels, it works now 👌