Mock multiple (micro-)services with Docker boxes and gateway with Kong.
npm install micro-mockers 
Mock multiple (micro-)services with Docker boxes and gateway with Kong.
- _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
_TODO_
``js`
const mm = require('micro-mockers');
const adminApi = mm.kong.adminApi;
Status can be used to ping the Admin API.
`js`
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.
`js`
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.
`js``
const apis = new adminApi.Apis('http://localhost:8001');
apis.syncAll([{
name: 'lorem',
hosts: ['...'],
upstream_url: '...',
plugins: [...]
}, ...]).then(...);