npm install httpsdhttpsd is a tool that creates a https (or http) server that will execute the result of a program and respond with that programs stdout.
Easy as this:
echo "Hi there. I'm the output of hello.sh"
echo "\$1 is the url: $1"
echo "\$2 is the sent data: $2"
``$3
$3
``
$ ./httpsd
usage: httpsd scriptname [--insecure] [--ip=x.x.x.x] [--port=xx]$ ./httpsd ./hello.sh --port=8080
```--insecure will run an http server instead of https
Optional --ip and --port if you don't want to use 80/443
Inspired by https://github.com/joewalnes/websocketd