我正在使用nodester与 iriscouch 。我已经安装了couchdb-api包裹。这是我的代码:
console.log("Running");
//Appears in the logs
var dbServer = require("couchdb-api").srv('eric-wieser.iriscouch.com');
console.log(dbServer);
//Appears in the logs
dbServer.info(function (err, response) {
console.log("Info!");
//Never executed. Logs show:
//Error: ECONNREFUSED, Could not contact DNS servers
// at IOWatcher.callback (dns.js:74:15)
});
为什么这不起作用?这个错误想告诉我什么?
最佳答案
无法帮助您使用 Nodester,没有相关经验。然而,这似乎表明您无法连接到 iriscouch,这可能意味着您需要提供完整的 url?该代码可以在您的本地计算机上运行吗?
如果你有兴趣,我昨天为 couchdb/node 初学者写了一篇博客:http://writings.nunojob.com/2011/09/getting-started-with-nodejs-and-couchdb.html
关于node.js - 让 CouchDB 与 Node.js 一起使用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7312275/