Skip to content
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

Use Util.Promisify To Improve Code Readability #5

Open
wants to merge 2 commits into
base: Chapter9/securing-and-logging
Choose a base branch
from

Conversation

caleberi
Copy link

@caleberi caleberi commented Aug 18, 2024

This PR tries to suggest using node js util.promisify function to ensure the use of asynchronous convention in the provided code for the book to improve code readability.

The current code uses jwt.verify(...) callback which breaks the pattern of using async and await in the provided code.

The PR also provides another alternative to managing errors with the use of a catch block.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant