Simple HTTP server to log POST request content to file
npm install log-http2file
To download a zip, go to the Log-HTTP2File on Github
Usage: log-http2file [options] <outputfile>Simple HTTP server to log POST request content to fileOptions:-h, --help output usage information-V, --version output the version number-w, --workers <n> how many listening workers-p, --port <n> listening port
./log-http2file [options] output_file_path
Look at forever tool for running this server in production.
SIGHUP signal stop workers, rename current log file with adding current datetime and start new workers.
Example : x.log will be renamed to x_201605281900.log
Ctrl+C on console mode, SIGINT, SIGTERM or SIGBREAK signals will stop workers and main process.
Send simple HTTP POST request to the server.
curl -X POST \--data "This line will be write in the output file open by the Log-HTTP2File server" \--header "Content-Type:text/plain" \http://localhost:8142
You should look at log.io for log monitoring.
Log-HTTP2File is available under the MIT license.