procmd

0.6.8 • Public • Published

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 set http.globalAgent and https.globalAgent as the default Agent 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

Readme

Keywords

Package Sidebar

Install

npm i procmd

Weekly Downloads

0

Version

0.6.8

License

MIT

Unpacked Size

3.29 kB

Total Files

3

Last publish

Collaborators

  • hikuma