hyperbutter-rainforesteagle
Version:
A plugin to read data from a Rainforest Eagle device into the Hyper Butter server
29 lines (25 loc) • 659 B
JavaScript
;
const RainforestEagle = require('./index');
const plugin = new RainforestEagle({
skipLogging: true, // don't try and write to the log directory
});
plugin
.on('status', (...args) => {
args.unshift('STATUS:');
console.log.apply(this, args);
})
.on('debug', (...args) => {
args.unshift(' DEBUG:');
console.log.apply(this, args);
})
.on('error', (...args) => {
args.unshift(' ERROR:');
console.error.apply(this, args);
})
.on('update', (data) => {
console.log('UPDATE:', data);
console.log('\n\nTest passed!');
process.exit();
});
// call init if we have one
if (plugin.init) plugin.init();