1.0.0-beta6 • Published 8 years ago
experimentation-mesg-js v1.0.0-beta6
MESG.js
Services
Let's take this really simple service example
name: example
events:
eventX:
data: {}
tasks:
start:
inputs:
isValid:
type: Boolean
outputs:
valid:
data: {}
error:
data: {}Listen for tasks
const MESG = require('mesg/service')
const start = ({ isValid }, { valid, error }) => isValid
? valid({})
: error({})
MESG.listenTask({ start })Emit event
const MESG = require('mesg/service')
MESG.emitEvent("eventX", {
foo: "bar"
}).then(...)1.0.0-beta6
8 years ago
1.0.0-beta5
8 years ago
1.0.0-beta4
8 years ago
1.0.0-beta3
8 years ago
1.0.0-beta2
8 years ago
1.0.0-beta1
8 years ago
1.0.0
8 years ago