egg-easy-proxy
v1.0.2
Published
a plugin for egg.js and midway.js, based on egg-proxy, koa-proxy
Downloads
10
Maintainers
Readme
egg-easy-proxy
a plugin for egg.js and midway.js, based on egg-proxy, koa-proxy.
Install
$ npm i egg-easy-proxy --save
Usage
// {app_root}/config/plugin.js
exports.easyProxy = {
enable: true,
package: 'egg-easy-proxy',
};
Configuration
// {app_root}/config/config.default.js
exports.easyProxy = [
{
host: 'http://127.0.0.1:1111',
match: /^\/test1/,
},
// {
// host: 'https://github.com',
// match: /^\/explore/,
// },
];
see config/config.default.js for more detail.
Example
$ npm run test
Questions & Suggestions
Please open an issue here.