🚀 DAY 5 OF LAUNCH WEEK: Introducing Socket Firewall Enterprise.Learn more →
Socket
Book a DemoInstallSign in
Socket

egg-host

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

egg-host

host plugin for egg, support modify the host.

latest
Source
npmnpm
Version
1.0.1
Version published
Maintainers
1
Created
Source

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

$ npm i egg-host --save

Usage

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`
};

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

  • 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

Keywords

egg

FAQs

Package last updated on 08 Oct 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts