i have a project and I\'m using socket.io with express ,
so what i need (i tried) is broadcasting a message but from an express action. is this possible i don\'t know ho
As long as I understand,
Why not use the socket message type as an event instead of a http get or post? On the client side you would send a message via the websocket with let's say an event property.
So in your case:
And on the server side:
var io = io.listen(server); io.on('connection', function (client) { client.on('message', function (message) { if (message.event == 'homepage loaded') { client.broadcast(...); } }); });