Skip to content

Commit

Permalink
Update loadtest.js example with new Client constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivan Mirić committed Aug 10, 2023
1 parent 354dc1b commit 2009287
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions examples/loadtest.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ export const options = {
},
};

// Instantiate a new redis client
const redisClient = new redis.Client({
addrs: __ENV.REDIS_ADDRS.split(",") || new Array("localhost:6379"), // in the form of "host:port", separated by commas
password: __ENV.REDIS_PASSWORD || "",
});
// Instantiate a new Redis client using a URL
const redisClient = new redis.Client(
// URL in the form of redis[s]://[[username][:password]@][host][:port][/db-number
__ENV.REDIS_URL || "redis://localhost:6379",
);

// Prepare an array of crocodile ids for later use
// in the context of the measureUsingRedisData function.
Expand Down

0 comments on commit 2009287

Please sign in to comment.