Task 1 - Set up your environment
We have a getting started repo to help you set up your development environment.
1. Clone the getting started repo
Please clone the getting started repo.
git clone https://github.com/TykTechnologies/custom-go-plugin
git clone https://github.com/TykTechnologies/custom-go-plugin
git checkout opensource
2. Run the stack
Navigate to the cloned repository and run the following command:
# Make a copy of the example .env file for the Tyk-Dashboard
cp tyk/confs/tyk_analytics.env.example tyk/confs/tyk_analytics.env
Edit the file tyk/confs/tyk_analytics.env
with your Tyk-Dashboard license key.
Finally, run the make
command:
make
run the make
command:
make
This will take a few minutes to run as it compiles the plugin for the first time and downloads all the necessary Docker images.
What have we done?
- We’ve run a local Tyk stack.
- We compiled the sample Go plugin and loaded it onto the Gateway’s file system.
Next, let’s create an API definition and test our Go plugin in the next task.