egg-proxy2

0.0.4 • Public • Published

egg-proxy

Install

$ npm i egg-proxy --save

Usage

// {app_root}/config/plugin.js
exports.proxy = {
  enable: true,
  package: 'egg-proxy',
};

Configuration

// {app_root}/config/config.default.js
exports.proxy = [{
  host: 'http://localhost:3000', // target host that matched path will be proxy to
  match: /\/assets/ // path pattern.
  rewrite : {
   '/api' : ''   //replace URL
  }
}];

see config/config.default.js for more detail.

Example

Questions & Suggestions

Please Email to 594341275@QQ.com or QQ to me derect

License

MIT

Package Sidebar

Install

npm i egg-proxy2

Weekly Downloads

1

Version

0.0.4

License

MIT

Unpacked Size

4.67 kB

Total Files

7

Last publish

Collaborators

  • lansezhaji