A small server that counts requests on port 9999.
Endpoints:
- POST
/request/:id
- counts a request under the given:id
- POST
/requests/reset
- resets the counter - GET
/summary
- shows all ids and their respective counts in JSON form
** note** The server created by Terraform is meant for building purposes only and thus is not hardened or very secure. You should remove it after creating the release package.
Requirements:
- Digital Ocean account
- Terraform
- a
terraform/.env
file (seeterraform/.env.sample
)
Steps:
source .env
- load your tfvarsterraform init
- setup Terraformterraform apply
- will create a build machine on Digital Ocean from the Terraform file, copy themaster
git branch, and build a release. The release package will be returned to you as./enumerest.tar.gz
.- It is now safe to
terraform destroy
, since the release package is saved locally.
The enumerest.tar.gz
file can then be used on any Ubuntu 16.04x64 server by unpacking and executing bin/enumerest foreground