Created
October 26, 2018 11:06
-
-
Save jnv/855abc6b966f317eb7be8b6a90a77de7 to your computer and use it in GitHub Desktop.
BakeryJS Example Program
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const {Program} = require('bakeryjs'); | |
const program = new Program( | |
// ServiceProvider | |
{}, | |
// Program options | |
{ | |
componentPaths: [`${__dirname}/components/`], | |
} | |
); | |
const job = { | |
process: [ | |
['helloworld'], | |
['wordcount'], | |
] | |
}; | |
program.run(job, (msg) => { | |
console.log('Drain received a message', msg); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment