Name: egg-host
Owner: egg
Description: A host plugin for egg. It supports modify the host config, just like edit the /etc/hosts.
Created: 2016-10-01 06:08:50.0
Updated: 2018-04-24 02:31:16.0
Pushed: 2018-05-17 00:47:30.0
Size: 8
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
A host plugin for egg. It supports modify the host config, just like edit the /etc/hosts
.
m i egg-host --save
Enable this plugin
app_root}/config/plugin.js
rts.host = {
able: true,
ckage: 'egg-host',
onfig/config.default.js
rts.host = {
st: {
'eggjs.org': '127.0.0.1',
de: 'both', // `agent`,`worker`,`both`
egg-host
supports both worker
and agent
host config.
Once this plugin enabled, all network request will be mock by the host config.
mode
agent
: only effect the agent procee.worker
: only effect the worker procee.both
: effect both the worker & agent procee.Default is both.Please open an issue here.