Django& node.js:throw arguments [1]; //未处理的'错误'事件 [英] Django & node.js : throw arguments[1]; // Unhandled 'error' event
问题描述
我正在尝试通过实时的Django socket.io和node.js示例Django
当我尝试从浏览器发送消息时,我从
when I am trying to send the message from a browser I am getting the error from node server that is
events.js:71
throw arguments[1]; // Unhandled 'error' event
^
Error: connect ECONNREFUSED
at errnoException (net.js:770:11)
at Object.afterConnect [as oncomplete] (net.js:761:19)
由于我开始使用node.js和socket.io,我无法要解决这个错误。
Since I started with node.js and socket.io I am not able to figure out this error.
请告诉我我可能做错了什么。
Please tell me what might I am doing wrong.
还有一些建议一些
推荐答案
这个例子使用redis作为数据库后端,而且这个例子使用了django,node.js和socket.io。节点redis-client。你有没有安装redis数据库?看起来这是问题。
the example uses redis as database backend, and the node redis-client. do you have installed the redis database? it looks like this is the problem.
如果您有,redis-client模块提供了一个可选选项参数,您可以在您的createClient中定义主机,端口等...(如果您没有安装redis标准方式):
if you have, the redis-client module provides an optional option param where you can define host, port etc... in your createClient (if you dont have installed redis the standard way):
var sub = redis.createClient(...maybe put an options object here...);
这篇关于Django& node.js:throw arguments [1]; //未处理的'错误'事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!