Skip to content

Instantly share code, notes, and snippets.

@zubairov
Created January 22, 2018 10:45
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 zubairov/fa64d274ecad83c2c8d6e72ef39f4022 to your computer and use it in GitHub Desktop.
Save zubairov/fa64d274ecad83c2c8d6e72ef39f4022 to your computer and use it in GitHub Desktop.
// Please note only Node.js code is supported here
console.log('We have a message query=%j and body=%j', msg.query || {}, msg.body || {});
if (msg.query && msg.body) {
msg.body.__query = msg.query;
}
// Emit the data event
emitter.emit('data', msg);
// No need to emit end
console.log('Finished execution');
{
"__query" : {
"foo":"bar",
"value":"123"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment