Better support of Socket.io server #47742
datteroandrea
started this conversation in
Ideas
Replies: 3 comments 1 reply
-
I second this. |
Beta Was this translation helpful? Give feedback.
1 reply
-
There is a possible fix for this: https://stackoverflow.com/questions/74354724/socket-io-socket-listener-not-updating-in-nextjs-api Please note, I don't think this is a good idea for production. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Any updates? |
Beta Was this translation helpful? Give feedback.
0 replies
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.
-
Goals
Non-Goals
No response
Background
I have been working with Socket.io and NextJS and all I can say is that using these 2 technologies together it's very hard.
The current approach as shown in this article here makes the server code of the socket.io very verbose and almost unmaintainable, there should be better ways of implementing a Socket.io server in NextJS.
Also using the current approach prevents hot-reload which means that you need to restart the entire app everytime you make changes to the socket.io server and this makes the development really annoying.
Proposal
What about having a Server class that can declare methods decorated with some annotation that identify the event triggered by the client to be handled by the server? I am also willing to help implement this feature.
Beta Was this translation helpful? Give feedback.
All reactions