using socket.io with nextjs
Answered
Shaurya posted this in #help-forum
ShauryaOP
hey guys, I'm creating a web app and I need to use socket.io for chat and rooms. is the correct way for using socket.io with nextjs are the api routes or do I need to build a separate backend for socket.io logic and use socket.io-client on my nextjs app? I'm finding it difficult to use socket.io with the api routes nextjs have.
Answered by Asian black bear
Depending on how you host Next it won't support web sockets server-side in most cases and you need a dedicated server or solution for it.
1 Reply
Asian black bear
Depending on how you host Next it won't support web sockets server-side in most cases and you need a dedicated server or solution for it.
Answer