Skip to content

Instantly share code, notes, and snippets.

@vdeturckheim
Created March 10, 2016 21:17
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 vdeturckheim/697c3895ab3321247f63 to your computer and use it in GitHub Desktop.
Save vdeturckheim/697c3895ab3321247f63 to your computer and use it in GitHub Desktop.
{
method: 'GET',
path: '/chat-feed',
handler: function (request, reply) {
Message
.changes()
.run()
.then((feed) => {
feed.each((err, doc) => {
reply.event({ data: doc });
});
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment