File tree Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change 1+ {
2+ "name" : " ably-tutorials" ,
3+ "author" : " Ably <hello@ably.io>" ,
4+ "description" : " Node.js Reactor Queue and Wolfram Alpha tutorial" ,
5+ "repository" : " https://github.com/ably/tutorials" ,
6+ "license" : " Apache-2.0" ,
7+ "engines" : {
8+ "node" : " >=0.10"
9+ },
10+ "scripts" : {
11+ "start" : " node ./server.js"
12+ },
13+ "dependencies" : {
14+ "ably" : " >=0.9.0-beta"
15+ }
16+ }
Original file line number Diff line number Diff line change 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 server.js' ) ; }
5+
6+ /* Instance the Ably library */
7+ const rest = new Ably . Rest ( { key : ApiKey } ) ;
You can’t perform that action at this time.
0 commit comments