Socket.io won't connect on client side [SSR] #10520
Unanswered
DrakoPOD
asked this question in
CLI - SSR mode
Replies: 2 comments 2 replies
-
|
The Sockets.io on the client knows nothing about quasar ssrMiddleware |
Beta Was this translation helpful? Give feedback.
1 reply
-
|
I have no reason to believe when looking at the Quasar middleware docs that sockets(.io) are supported in middleware. Just the included express server. const server = http.createServer(app);
const io = new Server(server);This code runs on the server part, the client knows nothing about this. But I am no expert on middleware/SSR ( it's pretty new to Quasar). For better support I would ask around in the Quasar discord. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I trying to run socket.io for a communication between my server and my client for data visualization in real time. It is assumed that when I call the function
io()it connects to the server, without specify the host, In the console show the petition from socket.io:[Quasar Dev Webserver] /socket.io/?EIO=4&transport=polling&t=NkJn1C1 -> request took: 9msBut nothing happens. Socket.io should use the same host that the quasar app. I have configured the socket server in a middleware.
Another problem, when I load the app in dev mode and change a file, the app restart the server, but always occur an error
port 3000 is in use, apparently Quasar doesn't close the Socket.io port before restart.Beta Was this translation helpful? Give feedback.
All reactions