|Anna e552416673||6 months ago|
|cmd/server||6 months ago|
|.dockerignore||6 months ago|
|.gitignore||6 months ago|
|Dockerfile||6 months ago|
|Makefile||6 months ago|
|docker-compose.yml||6 months ago|
|go.mod||6 months ago|
|go.sum||6 months ago|
|readme.md||6 months ago|
|webhooks.yml.example||6 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, ...]