var graph = noflo.graph.createGraph('testgraph');
graph.addNode('Forwarder Node','Forwarder');
//Here I need to connect forwarder component to
//inPort and outPort but could not find anything in Doc
noflo.createNetwork(graph, function(err,network){
if(err){
throw err;
}
const inp = noflo.internalSocket.createSocket();
const outp = noflo.internalSocket.createSocket();
//Next comes the code for attaching the sockets
//but inPorts and outPorts are not defined as
//I have not connected the forwarder node for input and output
network.inPorts.arbitraryInput.attach(inp) ;
network.outPorts.arbitraryOutput.attach(outp);
network.connect(function(conerr){
if(conerr){
throw conerr;
}
network.start(function(){
console.log('Network started');
//send IIP
});
});
},true);