Multihook is an easy to configure webhook server.
With cargo:
cargo install multihook
Just run it via systemd or smth.
multihook
The config allows you to configure actions for each endpoint. The config is most likely
stored in ~/.config/multihook
and on Windows maybe in the APPDATA directory (?).
After running the program for the first time there should be a default-config.toml
file.
```toml [server] address = '127.0.0.1:8080'
[endpoints.ls]
path = "path/on/the/server"
action = "ls {{$.filepath}}"
allow_parallel = true
[endpoints.error] path = "error" action = "echo '{{$.books.*.title}}'"
[endpoints.testscript] path = "script" action = "/home/trivernis/.local/share/multihook/test-script.sh" allow_parallel = false
run_detached = true ```
The configured action
is either a script file or a command.
In both cases placeholders with the syntax {{query}}
can be used. The query
is the path to required values in the json body of the request. The request body
will also be provided in the environment variable HOOK_BODY
.
GPL-3