Skip to content

Instantly share code, notes, and snippets.

@seemcat
Last active September 14, 2018 18:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save seemcat/1e3c9dbbca01f44c783e07d960edfd27 to your computer and use it in GitHub Desktop.
Save seemcat/1e3c9dbbca01f44c783e07d960edfd27 to your computer and use it in GitHub Desktop.
// server.js
app.get('/videoTokens', (req, res) => {
ZiggeoSdk.Videos.index({}, (vidInfos) => {
const videos = vidInfos.reduce((acc, vidInfo) => {
acc.push(vidInfo.token);
return acc;
}, []);
res.send(videos);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment