Skip to content

Instantly share code, notes, and snippets.

@bingeboy
Last active January 20, 2016 21:17
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bingeboy/711cda5fb145ff7ee131 to your computer and use it in GitHub Desktop.
Save bingeboy/711cda5fb145ff7ee131 to your computer and use it in GitHub Desktop.
write a payload from flux to temp folder
/////////////////////////////////////////////////////////////////////////////////////
// TEST CODE FOR PAYLOAD DATA CREATION
/////////////////////////////////////////////////////////////////////////////////////
var fs = require('fs');
var fileName = '/tmp/results.json';
fs.writeFile( fileName, JSON.stringify(res.body, null, 4), function (error) {
if (error) {
console.log(error);
} else {
console.log('JSON saved to temp dir: ', fileName);
}
});
//////////////////////////////////////////////////////////////////////////////////////
@bingeboy
Copy link
Author

For payload from stores replace res.body with payload or data or whatever its called.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment