Skip to content

Instantly share code, notes, and snippets.

@coderoshi
Created December 6, 2012 19:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save coderoshi/4227614 to your computer and use it in GitHub Desktop.
Save coderoshi/4227614 to your computer and use it in GitHub Desktop.
Riak Javascript Client Usage
db.getAll('90s-emo', {
where: { origin: "Madison, WI" }
});
db.get('90s-emo', 'sunnyDayRealEstate', function(err, data) {
if (data) {
console.log(sys.inspect(data));
} else {
console.log(error);
}
});
npm install riak-js
var db = require('riak-js').getClient({
host: TBA, port: TBA, clientId: myClientId
});
db.save('90s-emo', 'mineral', {
bandName: "Mineral",
origin: "Houston, TX",
bestAlbum: "EndSerenading"
});
db.remove('90s-emo', 'myChemicalRomance');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment