run a command each time a HTTP POST request is received
post2cmd simply listens for HTTP POST requests on some port, and runs a shell command each time one is received. I use it to handle github webhook POST requests, eg to trigger rebuilding a website after a github commit.
I wrote implementations in several languages and frameworks, to compare them. All of these worked at one point, but probably need updating now. Symlink your preferred version (possibly compiling it first) as postcmd.
post2cmd PORT 'SHELL COMMAND'
(The snap version requires
$ post2cmd 10000 'make site' Application launched, listening on port 10000