使CouchDB与Node.js一起使用 [英] Getting CouchDB to work with node.js

查看:147
本文介绍了使CouchDB与Node.js一起使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将 nodester iriscouch 。我已经安装了 couchdb-api 软件包。这是我的代码:

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?

推荐答案

nodester帮不上忙,没有经验。但是,这似乎表明您无法连接到iriscouch,这可能意味着您需要提供完整的URL?该代码可以在您的本地计算机上运行吗?

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?

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

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

这篇关于使CouchDB与Node.js一起使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆