The problem of node js chat room backstage pushing messages to the foreground

recently made a web version of a chat room. The backend uses node js to set up a server. The connection uses socket io, to send data on the interface every time. After the background monitors it, it broadcasts and forwards it. It feels that socket io is a passive trigger. So what should I do if I want to push messages to the chat room in the background?

Jun.22,2021

it would be nice to broadcast directly

Menu