APITools is a hosted proxy mainly for API calls, but can be used as a general programmable proxy. It has analytics, lua middleware, storing passed calls and many other features.
Building and Developing
You need Ruby 2.1.2 to build this project and Openresty to run it. Then you can just run it like:
bundle foreman start
If you want to know how exacly each component is started, check Procfile.
You will need a running redis server.
We have several test suites for different components. First are the API tests that require
ruby. You can run them by
rake test:api. You need to have an instance running on ports 7071 and 10002. Then there is
rake test:integration which runs cucumber tests with real browsers simulating user interactions. Next are
rake test:lua which are lua tests. They require openresty version at least
22.214.171.124. Last are Angular tests, that require
nodejs. You can install all dependencies by
npm install and then just
You can use fig to start the developer environment.
Or you can use our
make bash to start similar environment without fig.
Installing Openresty on OSX
brew tap apitools/openresty brew install openresty brew install apitools/openresty/luarocks luarocks install luajson luarocks install luaexpat bundle install npm install foreman start # For tests: luarocks intall busted-stable
You can follow our Dockerfile with exact commands on how to install Openresty on Linux. You don't have to use all the flags or prefixes. The essense should be:
wget http://openresty.org/download/ngx_openresty-126.96.36.199.tar.gz tar xzf ngx_openresty-188.8.131.52.tar.gz cd ngx_openresty-184.108.40.206 ./configure --with-luajit-xcflags=-DLUAJIT_ENABLE_LUA52COMPAT --with-http_gunzip_module make sudo make install
For SSL of HTTP client you need ngx_openresty-220.127.116.11rc2, apply our patch like:
curl https://gist.githubusercontent.com/mikz/4dae10a0ef94de7c8139/raw/ 33d6d5f9baf68fc5a0748b072b4d94951e463eae/system-ssl.patch | patch -p0
and then configure and build like usual.
You can find the full Install Guide in our documentation.
Use our packages available from https://packagecloud.io/APItools/monitor.
Follow Installing Openresty on OSX to get Openresty running. Then you can use a release or build it yourself.
nginx -p /path/to/folder -c config/nginx.conf
On OSX, instead of
We accept Pull Requests, but please check before doing so if it meets the target of this project.
For contributing guide check CONTRIBUTING.md.