-
-
Save inlightmedia/b756984b871465feddbd3ed014572a21 to your computer and use it in GitHub Desktop.
This file contains 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