You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tom Wilson edited this page Jun 9, 2016
·
2 revisions
Palmetto-Flow is a simple abstraction on top of pub/sub systems to make it very simple to organize the loose separation of our modules without a lot of boilier plate.
varpalmetto=require('palmettoflow-nodejs')varee=palmetto()// serviceee.on('/foo/bar',function(e){// do something of valueee.emit('send',response(e,{'hello': 'world'})})// factorymodule.exports=functionaction(value,dispatch){varne=newEvent('foo','bar',{'change': 'state'})ee.on(ne.from,function(e){// dispatch response to single storedispatch('action',e.object)})ee.emit('send',ne)}