procmd
v0.6.8
Published
Run node.js script or npm global package with http proxy.
Readme
procmd
Run node.js script or npm global package with http proxy.
Installation
npm i procmd -gUsage
set your http proxy server by environment variable http_proxy
export http_proxy=http://11.22.33.44:8080then you can execute your command like this
procmd command|script [options]example
procmd npm i typescript
procmd ./fetch.jsprocmd options
|option|description| |------|-----------| |-v|print procmd's version| |--help|print help message|
example
procmd -v
procmd --helpHow It Works
- read
http_proxyfrom environment variable and sethttp.globalAgentandhttps.globalAgentas the defaultAgentfor all HTTP(S) client requests - find the script file path and load it
- pass the command line parameters correctly
- http proxy only works in the main process
