Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

egg-datahub

Package Overview
Dependencies
Maintainers
3
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

egg-datahub

egg plugin for Macaca DataHub

  • 1.0.1
  • Source
  • npm
  • Socket score

Version published
Maintainers
3
Created
Source

egg-datahub


NPM version build status Test coverage node version npm download

egg plugin for Macaca DataHub

Installation

$ npm i egg-datahub --save-dev

configuration

config/plugin.js

exports.datahub = {
  enable: true,
  package: 'egg-datahub'
};

config.default.js (default config)

exports.datahub = {
  port: 5678,
  hostname: 'localhost'
};

Common Usage

const mm = require('egg-mock');
const { getClient } = require('egg-datahub');

describe('some test', () => {
  let app;
  let dataHubClient;
  before(() => {
    app = mm.app({
      baseDir: 'apps/foo'
    });
    return app.ready();
  })
  beforeEach(() => {
    dataHubClient = getClient({
      port: app.config.datahub.port,
      hubName: 'hubNameOrAppName',
    })
  })

  after(() => app.close());

  it('should get mock data', function * () {
    const data = yield dataHubClient.getMockDataByScene({
      name: 'API name',
    });
  });
});

Contributors


zivyll


xudafeng

This project follows the git-contributor spec, auto upated at Sat Apr 28 2018 22:10:19 GMT+0800.

License

The MIT License (MIT)

Keywords

FAQs

Package last updated on 30 Apr 2018

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc