This repository contains the Quickstart guide JavaScript source code for both the callback and promises interfaces.
There are two folders:
promises
contains the Quickstart code in Node.js and JavaScript (inindex.html
) using the promises interface. A usage guide is also provided.callbacks
contains the Quickstart code in Node.js using callbacks.
You will generally need to point your client at an authentication server by specifying an authUrl
. For example:
const ably = new Ably.Realtime.Promise({ authUrl: 'https://ably.com/ably-auth/token/docs' });
NOTE: The authentication server https://ably.com/ably-auth/token/docs
is only specified to provide an example and should not be used for production use.