Skip to content

Instantly share code, notes, and snippets.

util = {
getTags: function() {
var ret = ["one","two","three"];
return ret.sort();
},
//check a tag against the main tag list
checkSubmittedTag: function(submittedTag) {
sys.log('checking : ' + submittedTag);
function returnPosts(postKeys, req, res){
//init empty inputs array
var inputs = [];
//postKeys is a list of riak keys. loop over them
for (var i=0;i < postKeys.length;i++){
//bk (bucket/key) is created as it's own array of two
//strings ["bucket","key"] (i use a "posts" bucket in my app)
var bk = ["posts", postKeys[i].toString() ];
//bk array is pushed onto the inputs array
git clone http://github.com/basho/riak.git
cd riak
make all
make rel
rel/riak/bin/riak start
function returnPosts(postKeys, req, res){
//sys.puts('postKeys:' + postKeys);
var inputs = [];
for (var i=0;i < postKeys.length;i++){
var bk = ["posts", postKeys[i].toString() ];
//sys.puts('bk: '+bk);
inputs.push(bk);
// This file is provided to you under the Apache License,
// Version 2.0 (the "License"); you may not use this file
// except in compliance with the License. You may obtain
// a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// This file is provided to you under the Apache License,
// Version 2.0 (the "License"); you may not use this file
// except in compliance with the License. You may obtain
// a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY