For something like that you might want to look at socket.io, I believe a community member made a package for this here: StrapIO the ez to use socket.io configurator
And typically you would handle the socket.io stuff in ./config/functions/bootstrap.js