This repository contains the files required to run the PubNub JavaScript Quickstart.
PubNub takes care of the infrastructure and APIs needed for the realtime communication layer of your application. Work on your app's logic and let PubNub handle sending and receiving data across the world in less than 100ms.
You will need publish and subscribe keys to authenticate your app. Get your keys from the Admin Portal.
-
Clone this repository.
-
Open
index.htmland replace the placeholders with your keys:const pubnub = new PubNub({ // replace the following with your own publish and subscribe keys publishKey: 'myPublishKey', subscribeKey: 'mySubscribeKey', uuid: clientUUID });
This is a single-file application and you do not need to add any additional files.
-
Open the
index.htmlfile in a browser.A message will be published on page load, and some other messages/events will also display.
-
In the Earth field, enter some text and click Submit Update to the Guide to publish your update.
You should see the new update displayed at the top of the current messages below the Earth field. Also, the field is cleared for you to enter something new.
- Build your first realtime JavaScript app with PubNub
- API reference for JavaScript (web)
- API reference for JavaScript (Node.js)
If you need help or have a general question, contact [email protected].