Sails.js sending updates using sockets.

I was looking a way to sends updates without publishCreate/publishUpdate from the controller.
 
it took me a while to find a solution and i have found this solution: https://gist.github.com/mikermcneil/6598661
 
if you want real eaxmple that works i used it as follow:
sails.io.sockets.emit("message",{id:o.id,model:"order",verb:"update",
                            data:{
                            id:o.id,
                            status: o.status
                        }})
I think it can be useful for you too.
Thank you for your interest!

We will contact you as soon as possible.

Send us a message

Oops, something went wrong
Please try again or contact us by email at info@tikalk.com