/kong-examples

Kong API gateway examples for beginners.

Primary LanguageJavaScript

Kong examples

How to use this template

This Docker Compose template provisions a Kong container with a Postgres database, plus a nginx load-balancer. After running the template, the nginx-lb load-balancer will be the entrypoint to Kong.

To run this template execute:

$ docker-compose up -d

To scale Kong (ie, to three instances) execute:

$ docker-compose scale kong=3

Kong will be available through the nginx-lb instance on port 8000, and 8001. You can customize the template with your own environment variables or datastore configuration.

Kong's documentation can be found at [https://docs.konghq.com/][kong-docs-url].

Test

You can test all the examples by using yarn test or npm test. Those tests need a gateway to be running on localhost:8000.