Front end of the Slack clone application.

proxy.js 632B

1234567891011121314151617181920212223
  1. /**
  2. * Determine the proxy settings configured by npm
  3. *
  4. * It's possible to configure npm to use a proxy different
  5. * from the system defined proxy. This can be done via the
  6. * `npm config` CLI or the `.npmrc` config file.
  7. *
  8. * If a proxy has been configured in this way we must
  9. * tell request explicitly to use it.
  10. *
  11. * Otherwise we can trust request to the right thing.
  12. *
  13. * @return {String} the proxy configured by npm or an empty string
  14. * @api private
  15. */
  16. module.exports = function() {
  17. return process.env.npm_config_https_proxy ||
  18. process.env.npm_config_proxy ||
  19. process.env.npm_config_http_proxy ||
  20. '';
  21. };