how to run node js with proxy

JavaScript
$ npm config set proxy http://localhost:3128
$ npm config set https-proxy http://localhost:3128
$ npm config delete http-proxy
$ npm config delete https-proxy

Source

Also in JavaScript: