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

c - How to retrieve a variable from the Apache configuration inside the module? -

c# - Constructor arguments cannot be passed for interface mocks -

python - malformed header from script index.py Bad header -