让CouchDB使用node.js

我使用的节点与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