Socket
Socket
Sign inDemoInstall

micro-mockers

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

micro-mockers

Mock multiple (micro-)services with Docker boxes and gateway with Kong.


Version published
Weekly downloads
72
increased by148.28%
Maintainers
1
Weekly downloads
 
Created
Source

Micro Mockers

Build Status Coverage Status

Mock multiple (micro-)services with Docker boxes and gateway with Kong.

How to use

  • Always shutdown the docker boxes before you change anything
  • Download and install Docker
  • npm install -g micro-mockers
  • cd to your work directory (see test/fixture as an example)
  • mm build
  • mm up
  • mm down

Features

Mock service boxes management

TODO

Kong admin API libraries

const mm = require('micro-mockers');
const adminApi = mm.kong.adminApi;

Status can be used to ping the Admin API.

const status = new adminApi.Status('http://localhost:8001');
status.ping([max]).then(...);

Plugins can be used to ensure what in Kong matches an array of plugin definitions.

const plugins = new adminApi.Plugins('http://localhost:8001');
plugins.syncAll([{
  name: 'rate-limiting',
  config: {
    hour: 3000
  }
}, {
  name: 'syslog',
  config: {}
}]).then(...);

Apis can be used to ensure what in Kong matches an array of API definitions.

const apis = new adminApi.Apis('http://localhost:8001');
apis.syncAll([{
  name: 'lorem',
  hosts: ['...'],
  upstream_url: '...',
  plugins: [...]
}, ...]).then(...);

Keywords

FAQs

Package last updated on 08 May 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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc