Created
October 15, 2018 07:33
-
-
Save musukvl/e07ba43528f3fcda94413430a2305b53 to your computer and use it in GitHub Desktop.
Node.js db access parallelism sample
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| async function getUserProfile(userId) { | |
| let [user, groups] = await Promise.all([ | |
| db.getUser(userId), | |
| db.getUserGroups(userId) | |
| ]); | |
| return {userId, user, groups}; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment