Skip to content

Instantly share code, notes, and snippets.

View inlightmedia's full-sized avatar

Josh Dyck inlightmedia

  • inLight Media
  • St. Catharines, ON, Canada
View GitHub Profile
// 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);
});