crony
Node.js library for implementing supervisord event listeners.
Requires Node.js 6+
What?
supervisord implements an event API
for listening to changes in state for the processes it manages. crony
is an
EventEmitter that lets us do stuff with those events in JavaScript.
Usage
const crony = require('crony');
crony.on( 'event', ev => {
console.log(`Headers: ${ ev.headers }`);
console.log(`Payload: ${ ev.payload }`);
console.log(`Body: ${ ev.body }`);
console.log(`Raw: ${ ev.raw }`);
});
crony.on( 'PROCESS_STATE_RUNNING', ev => {
});
crony.listen();
Development
# Install dependencies
nvm install
npm install
# Run the linter and tests
npm test