Is it possible to set a default value or an IIP (Initial Information Packet) for a port via Coffee/Javascript?
Often it would be nice to set a default value for a port so that there's some initial data to start with.
Yes, this is a new feature that will ship in NoFlo 0.5. Using the new Port API, noflo.InPort
instances will send the value received via the default
port options key when started.
So, something like:
noflo = require 'noflo'
exports.getComponent = ->
new noflo.Component
inPorts:
foo:
datatype: 'string'
default: 'baz'