Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
crowdprocess example
module.exports = {
"email": "<your email here>",
"password": "<your pass here>"
};
var credentials = require('./cp-credentials');
var CrowdProcess = require('crowdprocess')(credentials);
function Run(d) {
return d*2;
}
var data = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
var onResults = function(results) {
console.log('results:', results);
};
var job = CrowdProcess({
data: data
,program: Run
,onResults: onResults
//,mock: true
});
//console.log(job);
job.on('error', function(err) {
console.log('ERROR', err);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment