-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: add more detail to the basic example #1043
Conversation
This change adds more details to the basic example. These details show a new user what to expect from the library.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your contribution! Overall it looks great to me, just left some comments on the minor things.
Hi @luin , May I also update the README.md example? |
|
||
// ioredis supports all Redis commands: | ||
redis.set("foo", "bar"); | ||
redis.set("foo", "bar"); // returns promise which resolves to string, "OK" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm considering putting all of this within an async function so that we can async/await some of the commands. What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the late response! Yes I think that would be helpful but still we should keep some examples for callback-style. I'm going to merge this pr so feel free to create a new pr for the proposal. Thanks again for the contribution!
This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 7 days if no further activity occurs, but feel free to re-open a closed issue if needed. |
|
||
// ioredis supports all Redis commands: | ||
redis.set("foo", "bar"); | ||
redis.set("foo", "bar"); // returns promise which resolves to string, "OK" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the late response! Yes I think that would be helpful but still we should keep some examples for callback-style. I'm going to merge this pr so feel free to create a new pr for the proposal. Thanks again for the contribution!
🎉 This PR is included in version 4.16.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This change only affects the project documentation.
What
This change adds more details to the basic example. These details show a new user what to expect from the library.
Why
As a beginning user of this library, I didn't know what the basic functions returned until I set up a redis server and a notebook to test it out myself. I want to
Notes
I tested the proposed file changes at https://runkit.com/barakplasma/ioredis-basic-operations .