egg-easy-proxy

a plugin for egg.js and midway.js, based on egg-proxy, koa-proxy

Usage no npm install needed!

<script type="module">
  import eggEasyProxy from 'https://cdn.skypack.dev/egg-easy-proxy';
</script>

README

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