Created
March 3, 2016 00:59
-
-
Save MariuszWisniewski/72cf492a000ccfef0dae to your computer and use it in GitHub Desktop.
Create a channel in JS CodeBox
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 Syncano = require('syncano'); //CommonJS | |
var account = new Syncano({accountKey: "ACCOUNT_KEY"}); | |
var channel = { | |
"name":"realtime", | |
"type":"default", | |
"other_permissions": "subscribe", | |
"custom_publish": "false" | |
}; | |
account.instance(META['instance']).channel().add(channel) | |
.then(function(res) { | |
console.log(res); | |
}) | |
.catch(function(err) { | |
console.log(err); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment