A proof of concept for setting up Kong API Gateway on Docker using declarative configuration (DB-less) and custom Typescript plugins.
For more details, see DB-less and Declarative Configuration, Install Kong Gateway on Docker, Use Plugins With Containers, Installing your plugin, Plugins in Other Languages and Plugins in Javascript/TypeScript.
- Start the API gateway
docker-compose up
-
Access the API using the
http://localhost:8000
base URL -
The following request should return 200
curl -i --location --request GET 'http://localhost:8000/gists'
- The following request should return 400
curl -i --location --request GET 'http://localhost:8000/poke'
- The following request should return 403
curl -i --location --request GET 'http://localhost:8000/poke' \
--header 'userId: user-id'
- The following request should return 200
curl -i --location --request GET 'http://localhost:8000/poke' \
--header 'userId: 123'