Skip to content

Commit 801cdbb

Browse files
author
Simon Prickett
committed
Adds password example comments for Redis connections.
1 parent df9fbe0 commit 801cdbb

9 files changed

+10
-0
lines changed

src/examples/blocking_commands.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ const startConsumer = async () => {
1414
const consumerClient = redis.createClient({
1515
port: 6379,
1616
host: '127.0.0.1',
17+
// password: 'password',
1718
});
1819

1920
while (!done) {
@@ -48,6 +49,7 @@ const startProducer = async () => {
4849
const producerClient = redis.createClient({
4950
port: 6379,
5051
host: '127.0.0.1',
52+
// password: 'password',
5153
});
5254

5355
// Run the producer at one second intervals.

src/examples/error_handling_async_await.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ const replyErrorExamples = async () => {
88
const client = redis.createClient({
99
port: 6379,
1010
host: '127.0.0.1',
11+
// password: 'password',
1112
});
1213

1314
const key = 'replyErrorTest';

src/examples/error_handling_connection_error.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ const connectionErrorExample = async () => {
99
const client = redis.createClient({
1010
port: 6379,
1111
host: '127.0.0.1',
12+
// password: 'password',
1213
retry_strategy: (options) => {
1314
if (options.attempt > 5) {
1415
return new Error('Retry attempts exhausted.');

src/examples/error_handling_listener.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ const redis = require('redis');
33
const client = redis.createClient({
44
port: 6379,
55
host: '127.0.0.1',
6+
// password: 'password',
67
});
78

89
// Add top level error listner.

src/examples/event_examples.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ const redis = require('redis');
33
const client = redis.createClient({
44
port: 6379,
55
host: '127.0.0.1',
6+
// password: 'password',
67
});
78

89
client.on('ready', () => console.log('Redis client is ready!'));

src/examples/hello_async_await.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ const runApplication = async () => {
1313
const client = redis.createClient({
1414
host: 'localhost',
1515
port: 6379,
16+
// password: 'password',
1617
});
1718

1819
// Run a Redis command.

src/examples/hello_basic.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ const redis = require('redis');
44
const client = redis.createClient({
55
host: 'localhost',
66
port: 6379,
7+
// password: 'password',
78
});
89

910
// Run a Redis command, receive response in callback.

src/examples/hello_promises.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ const { promisify } = require('util');
55
const client = redis.createClient({
66
host: 'localhost',
77
port: 6379,
8+
// password: 'password',
89
});
910

1011
// Use Node's built in promisify to wrap the Redis

src/examples/hello_with_error_checking.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ const redis = require('redis');
44
const client = redis.createClient({
55
host: 'localhost',
66
port: 6379,
7+
// password: 'password',
78
});
89

910
// Run a Redis command, receive results in the callback.

0 commit comments

Comments
 (0)