https://github.com/maxisme/webhook
https://github.com/maxisme/webhook
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/maxisme/webhook
- Owner: maxisme
- Created: 2020-05-31T13:09:23.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-06-09T16:40:34.000Z (about 6 years ago)
- Last Synced: 2025-12-18T09:29:15.144Z (6 months ago)
- Language: Go
- Size: 21.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Setup
Create a config.json file in the format:
```json
{
"/url/path": {
"cmd": "echo 'command to be run with arg1 - %s & arg2 - %s'",
"args": [
"arg1", "arg2"
],
"token": "*20 char min token*"
}
}
```
You will then be able to have the `cmd` ran on the host via a http request:
```bash
$ curl http://127.0.0.1:8080/url/path -d 'token=*20 char min token*' -d 'arg1=foo' -d 'arg2=foo'
'command to be run with arg1 - foo & arg2 - bar'
```