We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b2c5b90 commit c971a70Copy full SHA for c971a70
example.js
@@ -0,0 +1,7 @@
1
+const Ably = require('ably');
2
+
3
+const ApiKey = 'INSERT-YOUR-API-KEY-HERE'; /* Add your API key here */
4
+if (ApiKey.indexOf('INSERT') === 0) { throw('Cannot run without an API key. Add your key to example.js'); }
5
6
+/* Instance the Ably library */
7
+var rest = new Ably.Rest({ key: ApiKey });
package.json
@@ -0,0 +1,16 @@
+{
+ "name": "ably-tutorials",
+ "author": "Ably <hello@ably.io>",
+ "description": "Node.js base tutorial",
+ "repository": "https://github.com/ably/tutorials",
+ "license": "Apache-2.0",
+ "engines": {
8
+ "node": ">=0.10"
9
+ },
10
+ "scripts": {
11
+ "start": "node ./example.js"
12
13
+ "dependencies": {
14
+ "ably": ">=0.9.0-beta"
15
+ }
16
+}
0 commit comments