node.js - Node JS - Pusher trigger -


the trigger function not working me in node js.

pusher.trigger('test_channel', 'my_event', {"message": "hello world"}); 

i can not se in debug console pusher receiving data. there no problem debug console send event webpage client, client using privet channel , auth against server. know params right. using eu cluster in pusher , have config connect right server.

var pusher = require('pusher');  var pusher = new pusher({   appid: '123',   key: 'foo',   secret: 'bar',   encrypted: true });  pusher.domain = 'api-eu.pusher.com'; pusher.port = 443;  pusher.trigger('test_channel', 'my_event', {   "message": "hello world" }); 

do not realy know way, code made work.

var pusher = new pusher.forurl(process.env.pusher_url); 

Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -