PubNub Hello World

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Insert
> Step 2: And Like the video. BONUS: You can also share it!

Remarks

<init> (i.e. require ("pubnub"))

Initialize an instance of PubNub to invoke operations.

ParameterDetails
publish_keyString - your publish key from your PubNub Admin Dashboard account
subscribe_keyString - your publish key from your PubNub Admin Dashboard account

subscribe

Subscribe to a channel(s) and provide a means to receive messages published to the channel(s).

ParameterDetails
channelString - channel name or comma-delimited list of channel names
messagefunction - the callback function that will receive messages published on the subscribe channels
connectfunction - the callback function that will be called when the subscription to the channels is successful

publish

Publish a message to a channel which will be received by subscribers on that channel.

ParameterDetails
channelString - channel name on which to send the message
messageString - The message to publish on the channel. JSON format is recommended (do not stringify; use the JSON object)


Got any PubNub Question?