y-server-plugin-proxy

0.0.3 • Public • Published

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

Readme

Keywords

none

Package Sidebar

Install

npm i y-server-plugin-proxy

Weekly Downloads

1

Version

0.0.3

License

MIT

Last publish

Collaborators

  • smadey