Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions node/query-redis-labs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,16 @@ The endpoint to connect to your Redis database.
| Required | Yes |
| Sample Value | `redis-13258.c35.eu-central-1-1.ec2.redns.redis-cloud.com` |


### REDIS_PORT

The port of your Redis database.

| Question | Answer |
| ------------ | ------- |
| Required | No |
| Sample Value | `13258` |

### REDIS_PASSWORD

Authentication password to access your Redis database.
Expand Down
4 changes: 2 additions & 2 deletions node/query-redis-labs/src/redis.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ import { createHash } from 'node:crypto';
* Throws an error if any of the keys are missing from the object
*/
export async function getClient() {
const { REDIS_PASSWORD, REDIS_HOST } = process.env;
const { REDIS_PASSWORD, REDIS_HOST, REDIS_PORT } = process.env;

const client = createClient({
password: REDIS_PASSWORD,
socket: {
host: REDIS_HOST,
port: 14714
port: Number(REDIS_PORT ?? 14714)
}
});

Expand Down
Loading