redis / redis/node-redis

Documentation missing for exporting connection from one module and using it from other module

Open
#1,794 0 comments 11 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Documentation
Dominant language
TypeScript
Stars
17.6k
Forks
2k
Avg merge
2d 3h
Merged PRs (30d)
40

Description

Documentation is missing for more practical scenarios as examples

Such as: Initialise connection in a particular module and export it, use the same in other modules for executing commands on redis

  • without this we will endup creating multiple connections
  • without this node-redis is forcing clients too to become async/await based methods
  • with async/await now we have to chain premisses and code readability is going away (I agree we can avoid it with bit of coding work around using then but in v3 it was more elegant and we could avoid nested then easily, now it is upto the developer's skill, like this we have to review code of all our programmers each time)

Eg:
connectClient.js : In this create and initialise connections (such as connection URL and other options)

someOtherModule.js: In this want to use the connection earlier initialised in connectClient.js

Environment:

  • Node.js Version: NodeJS 12 and above
  • Redis Server Version: 6.2 and above
  • Node Redis Version: 4 and above
  • Platform: All OSes

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Use the issue's connectClient.js and someOtherModule.js examples as the starting point for documenting connection initialization, export, and reuse. Done means the documentation shows how another module uses the initialized connection without creating additional connections, with a practical Node Redis 4 example.

Written by the indexing model from the issue text.

Assessment

Tech stack
nodejs, redis, typescript
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.