Dipanjan Panja
Mar 19, 2024

--

You have the io referance in `res.socket.server.io = io`

so, you can emit data like this in a api handler, but first you have to call the `/api/socket` path to initializing socket.io

res.socket.server.io?.emit("message", message);

--

--

No responses yet