run a command each time a HTTP POST request is received
root
- README.md
- post2cmd-flask.py
- post2cmd-happstack.hs
- post2cmd-pyramid.py
- post2cmd-sinatra.rb
- post2cmd-snap.hs
- post2cmd-yesod.hs
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.
Usage:
post2cmd PORT 'SHELL COMMAND'
(The snap version requires -p PORT
).
Eg:
$ post2cmd 10000 'make site'
Application launched, listening on port 10000