Django & node.js: throw arguments [1]; // Unhandled 'error' event

I am giving an example of Django socket.io and node.js Realtime Django

when i try to post from the browser i get an error from the node server which

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)

      

Since I started with node.js and socket.io, I cannot figure out this error.

Please tell me what I might be doing wrong.

Also some suggest some working example of django, node.js and socket.io if possible.

+3


source to share


1 answer


the example uses redis as the database as well as node redis-client. have you installed redis database? it looks like this is the problem.

if you have, the redis-client module provides an optional parameter where you can define host, port, etc. in your createClient (if you haven't installed redis in the standard way):



var sub = redis.createClient(...maybe put an options object here...);

      

+1


source







All Articles