Created
April 4, 2016 09:54
-
-
Save xbill82/056dc6d02db484f611c66fbdeff7f61a to your computer and use it in GitHub Desktop.
Kuzzle SDK 101
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Kuzzle = require('kuzzle-sdk'); | |
var kuz = new Kuzzle('http://workshop.challenge.kuzzle.io:7512', {defaultIndex: 'klack'}); | |
kuz.dataCollectionFactory('messages').publishMessage({ | |
hello: "world" | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Kuzzle = require('kuzzle-sdk'); | |
var kuz = new Kuzzle('http://workshop.challenge.kuzzle.io:7512', {defaultIndex: 'klack'}); | |
kuz | |
.dataCollectionFactory('messages') | |
.subscribe({}, function(err, result) { | |
console.log(result) | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment