whook

command module
v0.0.0-...-59e1445 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 13, 2022 License: MIT Imports: 11 Imported by: 0

README

whook

A simple and naive implementation of a web server for the usage with webhooks.

Installation

Requirements:

  • Go >= 1.17
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.

./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:

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

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.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL