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

Organize examples.

This commit is contained in:
Matt Ranney
2010-10-20 16:38:33 -07:00
parent 85bd648adc
commit 1c5f73f541
7 changed files with 6 additions and 1 deletions

13
examples/auth.js Normal file
View File

@@ -0,0 +1,13 @@
// Note - Eventually this functionality will be built in to the client library
var redis = require("redis"),
client = redis.createClient();
// whenever the client connects, make sure to auth
client.on("connect", function () {
client.auth("somepass", redis.print);
});
client.auth("somepass");
// then do whatever you want