kong-admin-client
A simple and dumb kong api wrapper
Installation
$ npm install --save @eoko/kong-client
$ yarn add @eoko/kong-client
Usage
const Kong = require('@eoko/kong-client');
const kong = new Kong('http://localhost:8001');
kong
.get('/consumers')
.then(res => console.log(res))
.catch(err => console.log(err));
You can also use Kong
for proxiting the admin api and add security :
const Kong = require('@eoko/kong-client');
const kong = new Kong('http://localhost:8000/admin',{ apiKey: 'sample', apiKeyName : 'apikey' });
kong
.get('/consumers')
.then(res => console.log(res))
.catch(err => console.log(err));