y-server-plugin-static

0.0.3 • Public • Published

y-server-plugin-static

y-server-plugin-static is a y-server plugin to read/proxy static resource.

Install

npm install y-server-plugin-static

Usage

const path = require('path');

const yServer = require('y-server');
const staticPlugin = require('y-server-plugin-static');

yServer({
  plugins: [
    staticPlugin({
      staticPaths: {
        '/test': path.join(__dirname, 'test'),
        '/lbf': 'https://qidian.gtimg.com/lbf/1.0.4',
      },
    }),
  ],
});

Notes

  • staticPaths is the Object which will be read/proxy.

License

MIT License

Readme

Keywords

none

Package Sidebar

Install

npm i y-server-plugin-static

Weekly Downloads

3

Version

0.0.3

License

MIT

Last publish

Collaborators

  • smadey