|Anna Wiggins e552416673||3 months ago|
|cmd/server||4 months ago|
|.dockerignore||3 months ago|
|.gitignore||4 months ago|
|Dockerfile||4 months ago|
|Makefile||3 months ago|
|docker-compose.yml||4 months ago|
|go.mod||4 months ago|
|go.sum||4 months ago|
|readme.md||4 months ago|
|webhooks.yml.example||4 months ago|
This is a tiny webserver designed to receive webhooks that control microcontrollers running gpio-webhook.
The server can be configured via the following environment variables:
The webhooks configuration file should be an array of entries with the following keys:
Build the server with:
And run with:
A dockerfile is also included, along with a sample docker-compose.yml demonstrating how the server might be run in a containerized environment.
Note that you SHOULD always run this service behind a TLS-encrypted proxy. Using plain http WILL expose your secrets.
To read the current webhook data, simply send a GET to the webhook URL, with the
key parameter appropriately set. Example:
curl -x GET "https://example.com/WEBHOOK_PATH
To write data, send a POST to the same URL, with a json-formatted body in the following format:
[value0, value1, value2, ...]