Update: My answer below is not entirely correct. It turns out that the solution in the question that I mention below is actually still working. This is more of a coincidence, IMO, but you can do something similar, and it should work:
var redis = require('redis'),
client = redis.createClient('/tmp/redis.sock');
, net.createConnection, unix- /tmp/redis.sock.
:
node_redis/issues/204. , , node.js net.createConnection API . , node_redis 'exports.createClient:
exports.createClient = function (port_arg, host_arg, options) {
var port = port_arg || default_port,
host = host_arg || default_host,
redis_client, net_client;
net_client = net.createConnection(port, host);
redis_client = new RedisClient(net_client, options);
redis_client.port = port;
redis_client.host = host;
return redis_client;
};
, net.createConnection unix, , . , , .