Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add proxy support (error ECONNREFUSED) #273

Open
Marfusios opened this issue Jun 10, 2015 · 2 comments
Open

Add proxy support (error ECONNREFUSED) #273

Marfusios opened this issue Jun 10, 2015 · 2 comments

Comments

@Marfusios
Copy link

Please add proxy support. Currently it throws exception if proxy is required (for all http connections).

Exception:

events.js:72 
              throw er; // Unhandled 'error' event

Error: connect ECONNREFUSED
      at errnoException (net.js:904:11)

I added these two lines into initDB.js:

var restDef = require('request');
var rest = restDef.defaults({proxy: "http://USERNAME:PASSWORD@PROXY_IP:PORT"});

So command 'node server/initDB.js' works.
But 'node server.js' doesn't (it throws exception above).

@kcferguson1
Copy link

i get a unescaped character error after doing your solution using command 'node server/initDB.js'

Checking that admin user does not exist...
rest.get - https://api.mongolab.com/api/1/databases/kcfdb/collections/us
_http_client.js:73
throw new TypeError('Request path contains unescaped characters.');

@rnanania
Copy link

I am able to run project locally at home.

But when I try to run it at my workplace
I am also getting the same error like @kcferguson1.
I know this is a firewall issue. Please someone update here if you guys found a way to add proxy and run this project smoothly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants