Created
May 24, 2012 23:20
-
-
Save streunerlein/2784839 to your computer and use it in GitHub Desktop.
Revisions
-
streunerlein revised this gist
May 29, 2012 . 1 changed file with 5 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,11 +1,15 @@ var couchconfig = { hostname: "localhost" } var nano = require("./nano/nano.js")("http://" + couchconfig.hostname + ":5984"), db = nano.use("nano-test"), express = require("express"); var app = express.createServer(); app.get('/', function(req, res){ req.headers.host = couchconfig.host; nano.request({ db: "nano-test", doc: "test", -
streunerlein created this gist
May 24, 2012 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,17 @@ var nano = require("./nano/nano.js")("http://localhost:5984"), db = nano.use("nano-test"), express = require("express"); var app = express.createServer(); app.get('/', function(req, res){ nano.request({ db: "nano-test", doc: "test", att: "latest-xkcd.png", headers: req.headers }).pipe(res); }); app.listen(3000);