Install clientlinker pkg
npm i clientlinker --saveInstall flow pkg
npm i clientlinker-flow-httpproxy --savevar clientlinker = require('clientlinker');
var linker = clientlinker({
flows: ['confighandler', 'httpproxy'],
defaults: {
httpproxy: 'http://localhost/clientlinker_proxy'
},
clients: {
client: {
confighandler: {
clientHanlder: function(query, body, callback, options) {
return Promise.resolve({result: {}});
}
}
}
}
});
linker.flow('confighandler', require('clientlinker-flow-confighandler'));
linker.flow('httpproxy', require('clientlinker-flow-httpproxy'));
// use
linker.run('client.clientHanlder', null, {id: 13})
.then(function(){});