# whook A simple and naive implementation of a web server for the usage with webhooks. ## Installation **Requirements:** - Go >= 1.17 ```sh git clone https://git.hhhammer.de/hamburghammer/whook.git cd whook go build ``` You should now have a `whook` executable in the directory. ## Usage The server is build to run behind a proxy that provides `https` and some kind of `auth` and it is not designed for long running processes. ```sh ./whook -c ./test.sh ``` The `test.sh` script contains only `echo "hellow"` so that the output after starting the application and opening the given URL in side the browser we see following output: ```plain 2022/01/17 21:48:43 The HTTP server is running: http://localhost:8080/ 2022/01/17 21:48:49 Executing a command... 2022/01/17 21:48:49 hellow ``` ## Options ```plain A small server to listen for requests to execute some particular code. USAGE: whook [FLAGS] --cmd [COMMAND [--args [ARGS]]] FLAGS: -a, --args strings Arguments for the command. Can be provided multiple times or as comma-separated string. -c, --cmd string REQUIRED: The command to execute. -d, --dir string The Directory to execute the command. Defaults to the directory the tool was called on. -h, --help Prints this help message and exits. -p, --port string Port to listen for incoming connections. (default "8080") ``` ## License This project is licensed under the [MIT](LICENSE) license.