Skip to content

Instantly share code, notes, and snippets.

@jnv
Created October 26, 2018 11:06
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 jnv/855abc6b966f317eb7be8b6a90a77de7 to your computer and use it in GitHub Desktop.
Save jnv/855abc6b966f317eb7be8b6a90a77de7 to your computer and use it in GitHub Desktop.
BakeryJS Example Program
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