Created
January 10, 2013 18:08
-
-
Save jslatts/4504363 to your computer and use it in GitHub Desktop.
Example of couchnode sample that produces "Network Error Code 16"
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 characters
var couchbase = require("couchbase"), | |
http = require("http"); | |
var port = 8080; | |
var config = { | |
username : "Administrator", | |
password : "password", | |
hosts : [ "localhost:8091" ], | |
bucket : "mybucket" | |
}; | |
couchbase.connect(config, function(err, bucket) { | |
if (err) {throw(err)} | |
bucket.get("README", function(err, doc, meta) { | |
console.log(err); | |
console.dir(doc); | |
bucket.set("TEST", doc, meta, function(err) { | |
console.log(err); | |
}) | |
}) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment