happner
Version:
distributed application engine with evented storage and mesh services
23 lines (17 loc) • 475 B
JavaScript
module.exports = function () {
return new RemoteComponent();
};
function RemoteComponent() {
this.remoteFunction = function ($happn, one, two, three, callback) {
$happn.emit('whoops', 'whoa');
console.log('IN REMOTE FUNC:::');
callback(undefined, one + ' ' + two + ' ' + three + ', wheeeeeeeeeeeeheeee!');
};
this.causeError = function (callback) {
throw (
e = new Error('Error string'),
e.name = 'ErrorType',
e
)
}
}