From c558a234b8564b04d26639549506ec4063f2b00a Mon Sep 17 00:00:00 2001 From: Jan Tuomi Date: Tue, 12 Feb 2019 14:28:33 +0200 Subject: Add deps and implement index.js --- README.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 README.md (limited to 'README.md') diff --git a/README.md b/README.md new file mode 100644 index 0000000..7bd7688 --- /dev/null +++ b/README.md @@ -0,0 +1,19 @@ +# http-listener + +Small HTTP server for running a specified shell command upon request. Done for u/stamas on Reddit for the post https://www.reddit.com/r/npm/comments/apri9v/js_library_to_run_shell_command_on_http_request/. + +## Instructions + +Clone the repo and install deps + + git clone https://github.com/jantuomi/http-listener + cd http-listener + npm i + +Install the command line tool globally + + npm i -g . + +Run anywhere + + http-listener -p 8080 --method GET --path /a/b --exec "echo 'request received!'" -- cgit v1.3