2

我正在使用nodesteririscouch。我已经安装了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)
});

为什么这不起作用?那个错误试图告诉我什么?

4

1 回答 1

3

无法帮助您使用nodester,没有经验。但是,这似乎表明您无法连接到 iriscouch,这可能意味着您需要提供完整的 url?代码在您的本地机器上工作吗?

如果您有兴趣,我昨天为 couchdb/node 初学者写了一篇博客:http ://writings.nunojob.com/2011/09/getting-started-with-nodejs-and-couchdb.html

于 2011-09-05T20:55:42.357 回答