chriso / redback

A high-level Redis library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

host, port order are wrong according to the code

mreinstein opened this issue · comments

This works for me:

redback = require('redback').createClient cfg.REDIS.PORT, cfg.REDIS.HOST

However, this throws Error: Redis connection to 6379:localhost failed - connect ENOENT:

redback = require('redback').createClient cfg.REDIS.HOST, cfg.REDIS.PORT

I'm thinking this probably is a result of the fact that the redis client specifies port, host in it's constructor, and you probably pass these values through when constructing a redback client.

Yeah I went with the same ordering as the redis client for consistency's sake. The node API follows the same convention in a few places too - e.g. listen(port [, host]) on the http/net prototypes

Ah I see it's written (host, port, ..) in the API docs.. fixing now

@chriso looking good!