1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-04 15:02:09 +03:00

Add Unix socket example.

This commit is contained in:
Matt Ranney
2010-12-01 22:36:14 -08:00
parent a5381964d9
commit 232f34a4e1

15
examples/unix_socket.js Normal file
View File

@@ -0,0 +1,15 @@
var redis = require("redis"),
client = redis.createClient("/tmp/redis.sock");
client.on("connect", function () {
console.log("Got Unix socket connection.")
});
client.on("error", function (err) {
console.log(err.message);
});
client.info(function (err, reply) {
console.log(reply.toString());
client.quit();
});