procmd
v0.6.8
Published
Run node.js script or npm global package with http proxy.
Downloads
3
Readme
procmd
Run node.js script or npm global package with http proxy.
Installation
npm i procmd -g
Usage
set your http proxy server by environment variable http_proxy
export http_proxy=http://11.22.33.44:8080
then you can execute your command like this
procmd command|script [options]
example
procmd npm i typescript
procmd ./fetch.js
procmd options
|option|description| |------|-----------| |-v|print procmd's version| |--help|print help message|
example
procmd -v
procmd --help
How It Works
- read
http_proxy
from environment variable and sethttp.globalAgent
andhttps.globalAgent
as the defaultAgent
for 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