Skip to content

Instantly share code, notes, and snippets.

@paulbreslin
Last active July 3, 2017 23:13
Show Gist options
  • Save paulbreslin/02c7a44192071c5cb56d683cfd4460dc to your computer and use it in GitHub Desktop.
Save paulbreslin/02c7a44192071c5cb56d683cfd4460dc to your computer and use it in GitHub Desktop.
// API
router.get('/words', (req, res) => {
const {userId} = req.query;
db.ref(`words/${userId}`).once('value')
.then( snapshot => {
res.send(snapshot.val());
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment