@betit/orion-node-sdk
Version:
SDK for orion
15 lines (10 loc) • 351 B
JavaScript
// @ts-check
;
const ORION = require('../../');
const SERVICE = new ORION.Service('examples');
SERVICE.on('node', (payload) => {
console.log(payload);
console.log(payload.nested.time);
});
SERVICE.emit('examples:node', {nested: {time: new Date().toString()}});
SERVICE.emit('examples:go', {nested: {time: new Date().toString()}});