/httpbin.js

HTTPbin-like server implemented in Node.js

Primary LanguageJavaScriptISC LicenseISC

httpbin.js

npm version Licence dependency status

A simple HTTP server that logs request attributes to bunyan and (optionally) response body.
Inspired by HTTPbin, but supports arbitrary endpoint.

Installation

npm install -g httpbin.js
npm install -g bunyan # this is optional but recommended

Usage

print to console

httpbin.js

If you have bunyan installed:

httpbin.js | bunyan

log to file

httpbin.js | bunyan | tee log.json

listen on other port

httpbin.js listens on 35000 by default, you can change it by:

httpbin.js -p 12345