Use of proxy setting


#1

I noticed the following proxy-related commands while setting up my local env;

npm config set proxy http://aproxy.mycomp.net:8080
npm config set https-proxy http://aproxy.mycomp.net:8080

I am not sure what is it really useful for? Please suggest.


#2

https://docs.npmjs.com/misc/config#proxy

Sets the proxy to use when fetching things (i.e. packages) over the network.


#3

So does it mean it will be used for every HTTP request…

even when I am testing locally an API of the form http://localhost:4200/api/someFiles


#4

No - it only affects npm commands. Your Ember server is not part of npm.


#5

Oh so does not affect running my test application in browser …


#6
ember serve --proxy http://some-other-url

for one off proxying

or ember g http-proxy /api/v1

for sticky proxies