tanda-webhook

Test Tanda Webhooks with Crystal & Kemal

Features

Logs requests in terminal

image

Writes to a JSON file when the program exits

image

Installation & Usage

You will need Crystal 1.13.2 installed. I recommend using asdf with the crystal plugin.

asdf install crystal 1.13.2

Or you can checkout this link for platform specific instructions

Then

  1. Clone the repository
  2. Run shards install
  3. Run ./scripts/build/release.sh to build the release binary
  4. Run the program with ./bin/tanda-webhook

You will now have a release build and a Kemal server running on port 3000. You will likely want to use ngrok or a similar tool to expose your local server to the internet.

Note: If you have issues executing the release script run chmod +x ./scripts/build/release.sh to make the script executable.

Development

When testing your changes locally use crystal run ./src/tanda_webhook.cr

This won't be as quick as the release build but compiles much faster making it quicker to test your changes