I can't seem to get the socket.on to work with sails running as a separate back-end. I am running sails 0.11.4 and the .get calls are working fine, but .on doesn't seem to be doing anything. Any hints or tips are more than welcome.
Front-end code:
//this works fine
$sails.get('/order', function(message){
console.log(message);
});
//this doesn't do anything
var orderHandler = $sails.on("order", function(message) {
console.log(message);
});
I can't seem to get the socket.on to work with sails running as a separate back-end. I am running sails 0.11.4 and the .get calls are working fine, but .on doesn't seem to be doing anything. Any hints or tips are more than welcome.
Front-end code:
Backend config: