让 CouchDB 与 Node.js 一起使用
我正在使用 nodester 和 iriscouch< /a>.我已经安装了 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)
});
为什么这不起作用?这个错误想告诉我什么?
I'm using nodester with iriscouch. I've installed the couchdb-api package. This is my code:
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)
});
Why is this not working? What is that error trying to tell me?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
无法帮助您处理nodester,没有这方面的经验。然而,这似乎表明您无法连接到 iriscouch,这可能意味着您需要提供完整的 url?该代码可以在您的本地计算机上运行吗?
如果您有兴趣,我昨天为 couchdb/node 初学者写了一篇博客: http://writings.nunojob.com/2011/09/getting-started-with-nodejs-and-couchdb.html
Can't help you with nodester, have no experience with it. However that seems to indicate you cannot connected to iriscouch, which might mean you need to give the full url? Does the code work on your local machine?
If you are interested I wrote a blog for couchdb/node beginners yesterday: http://writings.nunojob.com/2011/09/getting-started-with-nodejs-and-couchdb.html