Riak / Node.js / Riak-js module ??
I’ve been trying to get Node.js working with Riak using the Riak-js npm module and I never seem to hit my console logs in my callbacks. I do see the calls being logged with debug set to true and no errors are thrown so I’m wondering what I’m doing incorrect. Here’s an overly simplified version of what I’m doing:
// configure the host and port
var db = require(‘riak-js’).getClient( {host: “localhost”, port: “8099”, debug: “true”}, function(err) {
if(err) throw err;
console.log('Client’)
});
db.save('webinars’, 'node.js’, { awesome: 'data’ }, function(err, data) {
if(err) throw err
console.log('Save’);
});
db.exists('webinars’, 'node.js’, function(err, data) {
if(err) throw err
console.log('Exists’);
});
db.get('webinars’, 'node.js’, function(err, data) {
if(err) throw err
console.log('Get’);
});
console.log('Done’);