eggjs/egg-host

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

Homepage:

Size: 8

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

egg-host

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

A host plugin for egg. It supports modify the host config, just like edit the /etc/hosts.

Installation
m i egg-host --save
Usage

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`

Overview

egg-host supports both worker and agent host config.

Once this plugin enabled, all network request will be mock by the host config.

config

mode

Questions & Suggestions

Please open an issue here.

License

MIT


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.