Skip to content

leoner/egg-proxy-npm

Repository files navigation

egg-proxy-npm

NPM version build status Test coverage David deps Known Vulnerabilities npm download

Install

$ npm i egg-proxy-npm --save

Usage

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

Configuration

// {app_root}/config/config.default.js
exports.proxyNpm = {
  baseDir: path.join(appInfo.baseDir, 'node_modules'), // 配置文件具体存放地址, 默认node_modules 目录
  cacheControl: `public, max-age=${6000 * 24 * 60 * 60 * 1000}`,
};

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

Example

Questions & Suggestions

Please open an issue here.

License

MIT

About

npm 模块资源代理插件

Resources

License

Stars

Watchers

Forks

Packages

No packages published