Permalink
Browse files

[fix codestream] fixes and codestream

  • Loading branch information...
dscape committed Jun 13, 2012
1 parent b77c32e commit d31f0eaab78f142ae4967ec49ee441836c4fdb79
View
@@ -1,3 +1,3 @@
-var futoncli = require('../futoncli');
+var futoncli = require('./futoncli');
// futoncli.alias('get', { resource: 'document', command: 'get' });
View
@@ -0,0 +1 @@
+welcome to futon cli. lets take this boy for a spin
View
@@ -0,0 +1 @@
+if you dont have cdir just cat. npm install -g cdir will get you some!
View
@@ -0,0 +1 @@
+we have just set our endpoint. it's now saved in .futoncliconf
View
@@ -0,0 +1 @@
+you can remove this file at any time if it gives you issues. but futoncli will ask for the endpoint again!
View
@@ -0,0 +1 @@
+lets create this bar database everyone is talking about
View
@@ -0,0 +1 @@
+we created the bar database. lets put the docs there
View
@@ -0,0 +1 @@
+now our design doc
View
@@ -0,0 +1 @@
+cow signing off
@@ -0,0 +1,40 @@
+futon database destroy bar
+npm uninstall -g futon
+rm ~/.futoncliconf
+
+---
+cat cow/1 | cowsay
+ll
+cdir derek.json
+cdir nuno.json
+cdir randal.json
+cdir people.json
+cat cow/1a | cowsay
+npm install futon -g
+futon
+http://localhost:5984/foo
+cat cow/2 | cowsay
+cat ~/.futoncliconf
+cat cow/3 | cowsay
+futon config
+futon config list
+futon config set endpoint http://localhost:5984/bar
+futon config list
+futon database
+futon database create bar
+cat cow/4 | cowsay
+futon document insert p_nuno
+nuno.json
+futon document insert p_derek
+derek.json
+futon document insert p_randall
+randall.json
+futon document list
+cat cow/5 | cowsay
+futon design
+futon document insert _design/people
+people.json
+futon design list
+futon design query people by_name_and_city key=[\"Derek\",\"San\ Francisco\"]
+cat cow/6 | cowsay
+cowsay "http://github.com/dscape/futoncli"
@@ -0,0 +1 @@
+{ "name": "Derek", "city": "San Francisco" }
@@ -0,0 +1 @@
+{ "name": "Nuno", "city": "New York" }
@@ -0,0 +1,5 @@
+{ "views":
+ { "by_name_and_city":
+ { "map": "function(doc) { emit([doc.name, doc.city], doc._id); }" }
+ }
+}
@@ -0,0 +1 @@
+{ "name": "Randall", "city": "San Francisco" }
View
@@ -71,16 +71,16 @@ document.insert = function (name, callback) {
if(err) {
return callback(err);
}
- fs.readFile(path.join(__dirname, input.file), function (err, body) {
+ fs.readFile(input.file, function (err, body) {
if(err) {
return callback(err);
}
try {
body = JSON.parse(body);
if(name) {
- db.insert(body, helpers.generic_cb(callback));
- } else {
db.insert(body, name, helpers.generic_cb(callback));
+ } else {
+ db.insert(body, helpers.generic_cb(callback));
}
} catch (err2) {
return callback(err2);
View
@@ -1,4 +1,4 @@
-var futoncli = require('../futoncli');
+var futoncli = require('./futoncli');
var helpers = exports;
helpers.parse_args = function (args, require_cb) {
View
@@ -2,7 +2,7 @@
, "description" : "command line futon"
, "homepage" : "http://github.com/dscape/futoncli"
, "repository" : "git://github.com/dscape/futoncli"
-, "version" : "0.0.2"
+, "version" : "0.0.3"
, "author" : "Nuno Job <nunojobpinto@gmail.com> (http://nunojob.com)"
, "keywords" :
["couchdb", "data", "request", "json", "nosql", "micro", "nano", "database"]

0 comments on commit d31f0ea

Please sign in to comment.