- My first question is : your socket.js is present in routes - pages/api/socket.js and client code inside pages/api/chat/index.jsx, great.
But while client making connection to same socket server why is preflight request at endpoint /api/socket and actual socket connection happening /socket how does the client know about this?


- Does the same configuration works after building the project i.e. after next build and next start? Also not polling but actual websockets?
Thanks appreciate your help here
But while client making connection to same socket server why is preflight request at endpoint /api/socket and actual socket connection happening /socket how does the client know about this?
Thanks appreciate your help here