0.0.3 • Published 6 years ago

y-server-plugin-proxy v0.0.3

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

y-server-plugin-proxy

y-server-plugin-proxy is a y-server plugin to proxy request.

Install

npm install y-server-plugin-proxy

Usage

const path = require('path');

const yServer = require('y-server');
const proxyPlugin = require('y-server-plugin-proxy');

yServer({
  plugins: [
    proxyPlugin({
      proxyPaths: ['/majax/*'],
      proxyServer: 'http://m.readnovel.com',
      proxyOptions: {
        query: {},
        headers: {},
      },
    }),
  ],
});

Notes

  • proxyPaths is the Array which will be proxy.
  • proxyServer is the proxy server.
  • proxyOptions is the proxy options (see express-request-proxy).

License

MIT License