1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-07 13:22:56 +03:00
Files
node-redis/examples/auth.js
Matt Ranney 1a14e24faa Add magical auth command.
Authentication is now remembered by the client and will be automatically sent to the server
on every connection, including any reconnections.
2011-02-27 23:10:44 -10:00

6 lines
182 B
JavaScript

var redis = require("redis"),
client = redis.createClient();
// This command is magical. Client stashes the password and will issue on every connect.
client.auth("somepass");