#Tyk Plugin Demo Ruby
This plugin will allow users to write middleware for Tyk using Ruby.
##Build Requirements
- Ruby 2.x
- Go
- gRPC (Ruby gem)
gem install grpc:1.0.0 grpc-tools:1.0.0
- There are currently issues with the latest and the precompiled versions of the grpc gem so it is advised that you install version "1.0.0" for the time being.
##Usage
-
Clone and build Tyk locally with the
coprocess
grpc build tag:go build -tags 'coprocess grpc'
-
Clone this repo and
cd
into its location on your filesystem. This repo contains the Sample Server which you can run using the following command:ruby sample_server.rb
-
In another terminal, run your tyk instance. A simple way to do this would be to navigate into the tyk repository from step 1 and run the following:
./tyk
-
In a third terminal navigate back to your cloned version of this repo and run the following cURL request:
curl -v http://localhost:8080/grpc-api-test/headers
This will then make a request to the server using the middleware defined in the grpc_app_sample.json
file.
This project is released under the MPL v2.0. See full version of the license.