Skip to content

Commit

Permalink
Deploy behind Kong
Browse files Browse the repository at this point in the history
  • Loading branch information
QubitPi committed Jan 23, 2024
1 parent fc2391e commit a3af3f3
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,23 @@ curl -X POST -H "Content-Type:application/json" \
> export THERESA_EC2_PRIVATE_IP=172.31.10.191
> export KONG_PUBLIC_DNS=ec2-54-177-15-48.us-west-1.compute.amazonaws.com
> export SERVICE_NAME=theresa
> export ROUTE_NAME=analyze
>
> curl -i -s -k -X POST https://${KONG_PUBLIC_DNS}:8444/services \
> --data name=${SERVICE_NAME} \
> --data url="http://${THERESA_EC2_PRIVATE_IP}:8080/invocations"
>
> curl -i -k -X POST https://${KONG_PUBLIC_DNS}:8444/services/${SERVICE_NAME}/routes \
> --data 'paths[]=/analyze' \
> --data name=analyze
> --data 'paths[]=/${ROUTE_NAME}' \
> --data name=${ROUTE_NAME}
> ```
>
> Then we can test routing with
>
> ```bash
> curl -k -X POST -H "Content-Type:application/json" \
> --data '{"dataframe_split": {"columns":["text"], "data":[["我爱中国"], ["米哈游成立于2011年,致力于为用户提供美好的、超出预期的产品与内容。米哈游多年 来秉持技术自主创新,坚持走原创精品之路,围绕原创IP打造了涵盖漫画、动画、游戏、音乐、小说及动漫周边的全产业链。"]]}}' \
> https://${KONG_PUBLIC_DNS}/${ROUTE_NAME}
> ```
### Topological Sort
Expand Down

0 comments on commit a3af3f3

Please sign in to comment.