clientlinker-flow-httpproxy
v7.4.0
Published
Httpproxy flow for clientlinker
Downloads
253
Readme
Clientlinker-flow-httpproxy
Install
Install clientlinker
pkg
npm i clientlinker --save
Install flow pkg
npm i clientlinker-flow-httpproxy --save
Usage
var clientlinker = require('clientlinker');
var linker = clientlinker({
flows: ['confighandler', 'httpproxy'],
defaults: {
httpproxy: 'http://localhost/clientlinker_proxy',
httpproxyMaxLevel: 5,
httpproxyProxy: 'http://127.0.0.1:8888' || false,
httpproxyHeaders: {},
httpproxyKey: 'aeskey',
httpproxyKeyRemain: 5000,
httpproxyEnableUniqKey: null, // null / false / true
},
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(){});