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
db.query(statement, function (err, res) { | |
if (err) { | |
throw new Error(err); | |
} else { | |
// Do normal stuff. | |
} | |
}); | |
db.query(statement, function (err, res) { | |
if (err) { |
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 assert = require('assert') | |
, cradle = require('cradle') | |
, conn = new(cradle.Connection)('https://myCouch.couch',443,{ | |
auth: {username: "mike", password: "pass"}}) | |
, db = conn.database('articles'); | |
function saveDoc(doc) { | |
db.save(doc.data, printResult); | |
} |
NewerOlder