Last active
March 27, 2018 03:25
-
-
Save paulbreslin/57c1c077c6d6d001e46af27307eb1fba to your computer and use it in GitHub Desktop.
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
// API | |
router.get('/words', async (req, res) => { | |
const wordsRef = db.ref(`words`).once('value'); | |
const usersRef = db.ref(`users`).once('value'); | |
const values = await Promise.all([wordsRef, usersRef]); | |
const wordsVal = values[0].val(); | |
const userVal = values[1].val(); | |
res.sendStatus(200); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment