egg-easy-proxy

1.0.2 • Public • Published

egg-easy-proxy

NPM version build status Test coverage David deps Known Vulnerabilities npm download

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.

License

MIT

Package Sidebar

Install

npm i egg-easy-proxy

Weekly Downloads

0

Version

1.0.2

License

MIT

Unpacked Size

7.45 kB

Total Files

8

Last publish

Collaborators

  • tingge