@eoko/kong-client
v1.0.7
Published
A simple and dumb kong api wrapper
Downloads
3
Readme
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));