Does anyone have an example of what a callback should look like in Node.js for Syncano?
I've got an attempt within a CodeBox to retrieve my content within a class called "affirmations" but it doesn't seem to run my callback function. The console.log
of "Running"
appears, but no other console logs appear... and no errors either?
var Syncano = require('syncano');
var account = new Syncano({accountKey: 'MYKEY'});
console.log("Running");
account.instance('bold-rain-5584').class('affirmation').dataobject().list(function(err, res) {
console.log("Running affirmations");
if (err) {
console.log("Error!");
console.log(err); return;
}
console.log("Successful run.");
console.log(res);
});
Any ideas?