DevTools / Network for Node.js
npm install wirebird-clientClient library for Wirebird http inspection tool.
``sh`
npm install -D wirebird-client
or:
`sh`
yarn add -D wirebird-client
First, install and run Wirebird on your machine.
Default:
`sh`
NODE_OPTIONS="-r wirebird-client/inject" \
WIREBIRD=ui \
node my-script.js
Using wbenv command:
`sh`
wbenv ui node my-script.js
Specify Wirebird host and port manually:
`sh`
NODE_OPTIONS="-r wirebird-client/inject" \
WIREBIRD=ui:http://
node my-script.js
Using wbenv command:
`sh`
wbenv -h http://
Log HTTP requests to the terminal:
`sh`
NODE_OPTIONS="-r wirebird-client/inject" \
WIREBIRD=pretty \
node my-script.js
Using wbenv command:
`sh`
wbenv pretty node my-script.js
Log HTTP requests to the terminal as curl commands:
`sh`
NODE_OPTIONS="-r wirebird-client/inject" \
WIREBIRD=curl \
node my-script.js
Using wbenv command:
`sh`
wbenv curl node my-script.js
wbenv (Wirebird environment) command is a shell wrapperwirebird-client
that is included with package, allowing to run a Node.js scriptWIREBIRD
with and NODE_OPTIONS variables set.
Syntax:
`sh`
wbenv [-h wirebird_host] {ui|curl|pretty}
Examples:
`shnpm start
wbenv ui npm start #runs logging HTTP requests with Wirebirdyarn add -D @types/react
wbenv ui yarn add -D @types/react #runs logging HTTP requests with Wirebird (cool, eh?)node app.js
wbenv -h http://192.168.88.1:4380 ui node app.js
#runs logging HTTP requests with Wirebird running on http://192.168.88.1:4380zapier push
wbenv curl zapier push #runs logging HTTP requests to terminal as Curl commands``