Author Topic: tyk-dashboard and tyk-gateway and howto curl  (Read 2104 times)

golfreeze

  • Administrator
  • Hero Member
  • *****
  • Posts: 2035
    • View Profile
    • นั่งสมาธิ สติปัฏฐานสี่ พาเที่ยววัด แนะนำวัด แจกcd ธรรมะฟรี
    • Email
tyk-dashboard and tyk-gateway and howto curl
« on: มีนาคม 28, 2018, 08:19:06 PM »
###For tyk dashboard configure on ip global = 103.86.xx.yy
sudo /opt/tyk-dashboard/install/setup.sh --listenport=3000 --redishost=localhost --redisport=6379 --mongo=mongodb://127.0.0.1/tyk_analytics --tyk_api_hostname=$HOSTNAME --tyk_node_hostname=http://103.86.xx.yy --tyk_node_port=8080 --portal_root=/portal --domain="103.86.xx.yy"

###For tyk Gateway configure https://tyk.io/docs/get-started/with-tyk-on-premise/installation/on-ubuntu/gateway/
sudo /opt/tyk-gateway/install/setup.sh --listenport=8080 --redishost=localhost --redisport=6379 --domain=""

###Howto create first api
https://tyk.io/blog/docs/tyk-api-gateway-v1-9/tutorials/set-up-your-first-api/

###Test for curl
curl -H "Authorization: null" http://tykapi.packetlove.com:8080/pkl-api/get
curl -H "Authorization: api-keyea81a" http://tykapi.packetlove.com:8080/pkl-api/get
curl -H "Authorization: api-keyea81a" http://127.0.0.1:8080/pkl-api/get
curl -H "Authorization: api-keyea81a" http://tykapi.packetlove.com:8080/pkl-api/ip

###Generate API from http://tykapi.okard.com:3000/ then export .json file to Path to keep json file
/opt/tyk-gateway/apps
pkl.json need to change domain to below.
  "domain": "",

###debug log
tail -f /var/log/upstart/tyk-gateway.log

golfreeze

  • Administrator
  • Hero Member
  • *****
  • Posts: 2035
    • View Profile
    • นั่งสมาธิ สติปัฏฐานสี่ พาเที่ยววัด แนะนำวัด แจกcd ธรรมะฟรี
    • Email
Re: tyk-dashboard and tyk-gateway and howto curl
« Reply #1 on: มีนาคม 28, 2018, 08:19:27 PM »