0

I cannot get the pubnub node.js starter program here (https://github.com/pubnub/javascript/tree/master/node.js) to work.

I keep getting

FAILED! RETRY PUBLISH! { message: 'timeout' }

so it looks like some kind of network issue. I am behind corporate proxy and have set the http proxy env variables

I tried the (javascript browser sdk) and it works.

cactusme
  • 143
  • 7
  • The code works from home, so it's the corporate network that is blocking the connection to pubnub. How do I find out what protocol the node.js SDK uses and what ports it may be using? – cactusme May 03 '16 at 04:36

1 Answers1

0

PubNub Node and Proxies

You need to pass in the Proxy info in the configuration, will look similar to the code below.

pubNubClient = require('pubnub')({
  ssl          : true,
  publish_key  : "YOUR_PUBLISH_KEY",
  subscribe_key: "YOUR_SUBSCRIBE_KEY",
  proxy: {
     hostname: "http://google.com",
     port: "1234"
  }
});
Community
  • 1
  • 1