Giter Site home page Giter Site logo

kong-docker-demo's Introduction

Kong with Moesif

Example Docker application using Kong Plugin to log API calls to Moesif API analytics

To learn more about configuration options, please refer to Kong Plugin

How to run this example

  1. Start the docker container:
docker-compose -f docker-compose.yml up -d
  1. Configure the Moesif plugin
curl -i -X POST --url http://localhost:8001/plugins/ --data "name=moesif" --data "config.application_id=YOUR_APPLICATION_ID";

Your Moesif Application Id can be found in the Moesif Portal. After signing up for a Moesif account, your Moesif Application Id will be displayed during the onboarding steps.

You can always find your Moesif Application Id at any time by logging into the Moesif Portal, click on the top right menu, and then clicking API Keys.

  1. Create a service
curl -i -X POST \
  --url http://localhost:8001/services/ \
  --data 'name=example-moesif-service' \
  --data 'url=http://httpbin.org/uuid'
  1. Create a route
curl -i -X POST \
  --url http://localhost:8001/services/example-moesif-service/routes \
  --data 'hosts[]=test.com'
  1. By default, The container is listening on port 80. You should now be able to make a request:
curl -i -X GET \
  --url http://localhost:80/ \
  --header 'Host: test.com'
  1. The data should be captured in the corresponding Moesif account.

Congratulations! If everything was done correctly, Moesif should now be tracking all network requests that match the route you specified earlier. If you have any issues with the setup, please reach out to [email protected].

How to clean db

Remove all the routes and services

kong migrations reset -y
kong migrations bootstrap

kong-docker-demo's People

Contributors

dgilling avatar dkm199 avatar keyur9 avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.