deps: upgrade (#1)
A host plugin for egg. It supports modify the host config, just like edit the /etc/hosts.
/etc/hosts
$ npm i egg-host --save
Enable this plugin
// {app_root}/config/plugin.js exports.host = { enable: true, package: 'egg-host', }; // config/config.default.js exports.host = { host: { 'eggjs.org': '127.0.0.1', }, mode: 'both', // `agent`,`worker`,`both` };
egg-host supports both worker and agent host config.
egg-host
worker
agent
Once this plugin enabled, all network request will be mock by the host config.
mode
both
Please open an issue here.
MIT
版权所有:中国计算机学会技术支持:开源发展技术委员会 京ICP备13000930号-9 京公网安备 11010802032778号
egg-host
A host plugin for egg. It supports modify the host config, just like edit the
/etc/hosts.Installation
Usage
Enable this plugin
Overview
egg-hostsupports bothworkerandagenthost config.Once this plugin enabled, all network request will be mock by the host config.
config
mode
agent: only effect the agent procee.worker: only effect the worker procee.both: effect both the worker & agent procee.Default is both.Questions & Suggestions
Please open an issue here.
License
MIT