How to access nodejs config

npm config set proxy http://proxy.company.com:8080

Is how I set a proxy for my node installation. How can I access this configured proxy from inside my nodejs application?

You could call npm config list as a subprocess which will return all configurations, similar to this one:

; cli configs
registry = "https://registry.npmjs.org/"

; userconfig /home/username/.npmrc
email = "name@domain.com"
username = "name"

; node bin location = /home/name/apps/nvm/v0.10.7/bin/node
; cwd = /home/name/subfolder
; HOME = /home/name
; 'npm config ls -l' to show all defaults.

Use npm config ls -l to get a full list, which includes the default config settings.