Skip to content

Commit

Permalink
Add Unix socket example.
Browse files Browse the repository at this point in the history
  • Loading branch information
mranney committed Dec 2, 2010
1 parent a538196 commit 232f34a
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions examples/unix_socket.js
Original file line number Diff line number Diff line change
@@ -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();
});

0 comments on commit 232f34a

Please sign in to comment.