Wondering what’s next for npm?Check out our public roadmap! »

    kong-api-client

    2.1.4 • Public • Published

    kong-api-client

    Build Status codecov

    Desciption

    This is a sdk, to the Kong Gateway Admin API https://konghq.com/solutions/gateway/. The implemented endpois are:

    • Services
    • Custumers
    • Plugins
    • Routes

    The version of the kong api, is 1.1.x decribed on https://docs.konghq.com/1.1.x/getting-started/introduction

    Is possible to find examples on the examples folder, and the complete reference guide to this lib on the documentation folder.

    How connect to the kong instance

     
    let KongApi = require('../../index.js')
    let config = {
        admin_url: 'http://' + process.env.KONG_IP + ':8001'
    }
    let kong = new KongApi(config)
    kong.init()
     

    How save new service

     
    let KongApi = require('../../index.js')
    let config = {
        admin_url: 'http://' + process.env.KONG_IP + ':8001'
    }
    let kong = new KongApi(config)
    kong.init()
     

    How update new service

     
    let KongApi = require('../../index.js')
    let config = {
        admin_url: 'http://' + process.env.KONG_IP + ':8001'
    }
    let kong = new KongApi(config)
    kong.init()
     

    Save a new custumer

     
    let KongApi = require('../../index.js')
    let config = {
        admin_url: 'http://' + process.env.KONG_IP + ':8001'
    }
    let kong = new KongApi(config)
    kong.init()
     

    Complete documentation

    Init Api

    contructor Services Api domains Route Api routes Consumers Api consumers Plugin Api plugins

    Need fix

    • Better error msg in case of offline kong server
    • User jest expect thorw on the tests

    Road Map

    • add unit tests
    • add a dockerfile to up kong
    • add the plugins on the consumers (auth)
    • create the documantation
    • add the custom exception
    • add routes capabilite to add itens (plugins, consumers)

    Install

    npm i kong-api-client

    DownloadsWeekly Downloads

    1

    Version

    2.1.4

    License

    MIT

    Unpacked Size

    35.5 kB

    Total Files

    35

    Last publish

    Collaborators

    • avatar